2022-08-03 13:51:05 +0100 received badge ● Famous Question (source) 2017-05-04 21:36:41 +0100 received badge ● Notable Question (source) 2014-01-21 08:46:54 +0100 received badge ● Notable Question (source) 2013-10-25 12:39:42 +0100 received badge ● Popular Question (source) 2013-08-30 15:10:34 +0100 received badge ● Popular Question (source) 2013-03-04 22:48:09 +0100 answered a question Assigning students in groups Thank you for the answer. I think I could use this to fill 6 groups randomly with the 60 students. Since the numbers of students in each group is larger than the number of groups, the problem is difficult to solve (cf. social golfer problem). In my case, between two sessions, each teacher could, one after the other, use this program to generate the composition of his new group (10 new students among 60-10n students he never had yet, n being the session's number). from random import shuffle a=[[i] for i in range(60)] n=len(a)/10 shuffle(a) results=[[a[i] for i in range(j*10,j*10+10)] for j in range(0,n)] results  2013-03-03 18:03:06 +0100 asked a question Assigning students in groups I have a project with 60 students and 6 teachers. I'd like to know if it is possible to use Matrix and Permutation functions in Sage to assign those 60 students in 6 groups. There would be 6 sessions (a month each). Each student has to work once with each teacher and avoid being in the same group of students (as much as possible). Thank you. 2013-02-24 14:32:04 +0100 received badge ● Scholar (source) 2013-02-24 14:32:04 +0100 marked best answer Simple tree diagram You can try T=Graph() T.add_edges([[1,2],[2,4],[3,6],[4,8],[5,10],[6,12],[1,3],[2,5],[3,7],[4,9],[5,11],[6,13]]); T.show(layout='tree',tree_root=1,tree_orientation='down')  The manual does not specify anything about left to right orientation so it might not be currently implemented. Edge labels are disabled by default and you can enable them with the argument edge_labels=True. You can check the manual for further details. 2013-02-24 04:32:36 +0100 commented answer Simple tree diagram I added edge_labels=True and labels are displayed. I need to display some fractions but they are very small and I'd like to have them larger. 2013-02-24 04:16:33 +0100 received badge ● Supporter (source) 2013-02-24 04:10:06 +0100 commented answer Simple tree diagram Thank you. That's exactly what I wanted to do. Now, I'm trying to add labels but it seems that the \displaystyle command doesn't work. 2013-02-23 21:42:22 +0100 asked a question Simple tree diagram How can I plot a simple tree diagram like the first one of the following link? http://reference.wolfram.com/mathemat... Is it possible to choose the orientation (from left to right) and display edge labels? Thank you.