Application Center - Maplesoft

App Preview:

Abstract Algebra: Complete set of Lessons

You can switch back to the summary page by clicking here.

Learn about Maple
Download Application


 

Chapter1.mws

Abstract Algebra with Maple
Chapter 1: Preliminaries

by Alec Mihailovs

Preface

This manual is intended to be used with Contemporary Abstract Algebra, by J. A. Gallian, 5th ed., Houghton Mifflin (2002). It was inspired by Abstract Algebra with GAP by J. G. Rainbolt and J. A. Gallian, Houghton Mifflin (2002). The latter manual is available for free downloading from the book's web site and from the authors` websites. I highly recommend, in addition to this Maple manual, solving exercises from both the textbook and the GAP manual.

1: Preliminaries

Properties of Integers

It is easy to factor integers in Maple:

> ifactor(2^57-1);

``(7)*``(1212847)*``(524287)*``(32377)

The greatest common divisor and the least common multiple can be evaluated in Maple as follows:

> igcd(715,1001);

143

> ilcm(843,216,51);

1031832

The next example shows how to find integer solutions of equations:

> isolve(7*x+15*y=1);

{x = -2-15*_Z1, y = 1+7*_Z1}

To find a particular solution, one can replace the unknown _Z1 by any integer value, for example, by 2:

> subs(_Z1=2,%);

{x = -32, y = 15}

Modular Arithmetic

Maple can do modular arithmetic, too:

> 345 mod 7;

2

It can be used for checking the validity of money order numbers, UPS pickup record numbers, ISBN numbers etc.

> isMoneyOrder:= n -> n<10^11 and trunc(n/10) mod 9 = n mod 10:

This function first checks if the number contains not more than 11 digits and then if the number formed by the first 10 digits is congruent to the last digit, i.e. check digit, modulo 9.

> isMoneyOrder(39539881642);

true

> isMoneyOrder(39559881642);

false

The similar construction works for air ticket numbers and UPS pickup records numbers, just by replacing modulo 9 to modulo 7:

> isUPS:= n -> n<10^10 and trunc(n/10) mod 7 = n mod 10:

> isUPS(7681139992);

true

> isUPS(1213731473673);

false

> isAirTicket:= n -> n<10^15 and trunc(n/10) mod 7 = n mod 10:

> isAirTicket(1213731473673);

true

For the UPC code, one needs to use a dot product, so we have to load the Linear Algebra package first:

> with(LinearAlgebra):

> isUPC:= n -> evalb(Vector[row](12,convert(n,base,10)) . Vector([1,3,1,3,1,3,1,3,1,3,1,3]) mod 10 = 0):

> isUPC(021000658978);

true

> isUPC(012000658978);

false

A similar construction works for bank checks:

> isBankCheck:= n -> evalb(Vector[row](9,convert(n,base,10)) . Vector([9,3,7,9,3,7,9,3,7]) mod 10 = 0):

> isBankCheck(13);

true

For ISBN numbers we need a slightly more sophisticated method, because inputs can include the letter X:

> isISBN:= proc(str) local s;
with(LinearAlgebra);
if type(str,integer) then s:=[str]; else
s:=sscanf(str,"%d%[Xx]") end if;
evalb(`if`(nops(s)=1,Vector[row](10,convert(s[1],base,10)),
`if`(nops(s)=2 and not s[2]="", Vector[row](10, [10,op(convert(s[1],base,10))]),Vector[row]([1,0$9]))) . Vector([$ 1..10]) mod 11 = 0) end:

> isISBN(0618122141);

true

> isISBN("618122141");

true

> isISBN("6x");

true

As you can see, ISBN numbers without an X can be entered either as integers, or as strings, inside quotes. ISBN numbers with an X at the end must be entered inside quotes, because it is not one of the data formats that Maple recognizes.

Mathematical Induction

Maple can evaluate many sums:

> sum(i,i=1..n);

1/2*(n+1)^2-1/2*n-1/2

> simplify(%);

1/2*n^2+1/2*n

> simplify(sum(i^10,i=1..n));

-1/2*n^3+n^5-n^7+5/6*n^9+1/2*n^10+1/11*n^11+5/66*n

> sort(%);

1/11*n^11+1/2*n^10+5/6*n^9-n^7+n^5-1/2*n^3+5/66*n

The answers can be proven by mathematical induction as follows:

> f:=n->1/11*n^11+1/2*n^10+5/6*n^9-n^7+n^5-1/2*n^3+5/66*n:

> f(1)=1 and simplify(f(n+1))=simplify(f(n)+(n+1)^10);

true

Also, Maple can find formulas for many polynomial sequences, for example, sums of squares, 1, 5, 14, 30, 55, ..., using interpolating polynomial

> interp([$1..5],[1,5,14,30,55],x);

1/3*x^3+1/2*x^2+1/6*x

Since formula is known, Maple can easily continue the sequence:

> f:=x->1/3*x^3+1/2*x^2+1/6*x:
for N from 6 to 10 do f(N) od;

91

140

204

285

385

>

>

Exercises

  • 1 . Factor 3^100+1 .
  • 2 . Find the greatest common divisor and the least common multiple of 670592745 , 83810205 , 113351790 , and 695529645 .
  • 3 . Find integer solutions of the equation 42*x-47*y = 1 .
  • 4 . Find the last digit of the ISBN number starting from 1-894511-01.
  • 5 . Find the formula for the sum of 9th powers of integers from 1 to n .
  • 6 . Find the formula for the elements of the sequence 3, 17, 81, 255, 623, 1293, ... and find the next 4 elements of the sequence.