*Please read all of the instructions before getting started.*

## instructions

This lab should be completed in groups of 1—4. You do not need to be in the same group as your presentation partner. I recommend keeping this window open as a tab in your browser.

First, one member of your group will need to log into the Sage Notebook server. Go to http://sagenb.org (Sage recommends that you use Firefox). Once you are logged into the Sage Notebook server, you will be in your "`Home`" directory. Click on "`New Worksheet`" towards the top left. A small window will pop up asking you what you want to call the worksheet. Name your worksheet

`MA4140 Lab 3 (name-1, name-2, etc.)`

where you should replace

`name-1`,

`name-2`, etc. with the appropriate first names of your group members separated by commas. You will be presented with a blank Sage worksheet.

Before you actually do anything with this worksheet, I want you to share it with me and the other members of your group. Click "`Save & Quit`" in the upper right hand corner. This will return you to your "`Home`" directory. Now, click on "`Share now`" in the middle column for your newly created worksheet. As you did on the last lab, type in the Sage usernames of the members of your group (separated by commas). If you do not know the usernames of your group members, you can get them here. You should also share the worksheet with me (my Sage username is `dcernst`). Once you have typed in the appropriate usernames, click "`Invite Collaborators`".

Now, open the worksheet back up. The goal of this lab is to explore permutations and subgroups of the symmetric group.

In a Sage cell, type

G=SymmetricGroup(10)

and evaluate the cell. It may look like nothing happened, but you just told Sage that you want to let $G$ denote the symmetric group $S_{10}$.

Next, in an empty Sage cell, compute the order of $G$ using the `.order()` command. (See Sage Lab 2 if you forgot how to do this.) Below the output you just got, `Shift+click` on a purple line to open the mini text editor and answer the following question:

(1) What formula is used to compute the order of $G$? (*Hint:* See a the first couple pages in Chapter 4 of our textbook.)

In Sage, we can define permutations. If we want to define the permutation $(1,3)(4,5)$ in $G$ to be called $a$, we can use following syntax:

a=G("(1,3)(4,5)")

Notice the commas between the entries in each cycle. This is necessary in case we want to use more than single digit numbers. Copy the code above and paste it into an empty Sage cell and click "`evaluate`".

Now, in an empty Sage cell, define the permutations $b,c,d$ as follows:

b=G("(5,7,2,9,3,1,8)")

c=G("(1,2)(3,4)")

d=G("(1,3)(2,5,8)(4,6,7,9,10)")

*Note:* If you want to, you can define all three of these permutations in a single Sage cell.

Below the output you just got, `Shift+click` on a purple line to open the mini text editor and answer the following question:

(2) Without using Sage, determine the orders of $a,b,c,d$? (*Hint:* See an exercise in Chapter 4 that we alluded to.)

Using Sage, compute the following products in $G$:

(1)Recall that a product of permutations is really function composition, and our convention is to compute the composition from right to left. Let's see if Sage agrees with this convention. Compute the following products using Sage:

(2)*Note:* Don't forget that you must use a `*` to denote multiplication in Sage. Below the output you just got, `Shift+click` on a purple line to open the mini text editor and answer the following questions:

(3) Does Sage agree with our right to left multiplication? Explain your answer.

(4) Is $G$ abelian? Explain your answer.

The *sign* of a permutation is defined to be positive $1$ if a permutation is even and $-1$ if the permutation is odd. We can use the `.sign()` command to determine if a permutation is even or odd. Type the following into an empty Sage cell and then click "`evaluate`":

a.sign()

Sage should return a value of 1. This means that $a$ is an even permutation. Now, use Sage to compute the sign of the permutations $b,c,d$.

Below the output you just got, `Shift+click` on a purple line to open the mini text editor and answer the following question:

(5) Is each of $b,c,d$ an even or an odd permutation?

Single elements of a permutation group can be used to generate cyclic subgroups, but you need to input them in a list containing just the one item. Create two cyclic subgroups of G with the commands:

H=G.subgroup([b])

K=G.subgroup([d])

Using the `.order()` command in Sage, compute the order of each of the subgroups $H$ and $K$.

We can use the `.list()` command to have Sage display all of the elements of a group. Type the following into an empty Sage cell and click "`evaluate`"

H.list()

Do the same thing for $K$.

We aren't restricted to using a single element to generate a subgroup. Loosely speaking, imagine forming all possible powers, and products of powers of the generators until you achieve a subset that is closed under products and inverses. Use the following command in Sage to define the subgroup $L$ generated by the permutations $b$ and $c$:

L=G.subgroup([b,c])

Using the `.list()` command, list all of the elements of $L$.

Below the output you just got, `Shift+click` on a purple line to open the mini text editor and answer the following questions:

(6) Is it really necessary to use both $b$ and $c$ to generate $L$? That is, would we get all of $L$ if we only used one of the generators? Explain your answer.

(7) Without doing any computations in Sage, explain why $L$ cannot be cyclic.

In an empty Sage cell, type the following:

e=G("(1,3)(2,8,5)")

f=G("(2,5,8)(4,7,10,6,9)")

M=G.subgroup([e,f])

Below the output you just got, `Shift+click` on a purple line to open the mini text editor and answer the following question:

(8) Is $M$ cyclic? Explain your answer. (*Hint:* Something else that you've done in this lab will help you answer this question.)

## getting help

If you need help, you can always contact me, or even better, post a question in the forum. In addition, there are some useful links on the Sage help page.

## due date

This lab is due by **5PM on Friday, April 2**.