Enumerate elements of a set built using properties

i like this post (click again to cancel)
0
i dont like this post (click again to cancel)

How can I enumerate all the elements of a set?

For example (I'll use latex to describe the desired set) if the set is:

$$ W = { u_{i}[j], \overline{u}_{i}[j]: 1 \leq i \leq n, 1 \leq j \leq m } $$

asked Oct 18 '11

oscarvarto gravatar image oscarvarto
41 1 2 3

updated Oct 18 '11

Mike Hansen gravatar image Mike Hansen flag of United States
3880 23 46 84

Explain what u_i[j] and \bar{u}_i[j] mean.

benjaminfjones (Oct 19 '11)
i like this answer (click again to cancel)
0
i dont like this answer (click again to cancel)

I don't know what your u_i[j]'s are, but you can do things like the following

sage: m = 2; n  = 3
sage: [ (i,j) for i in range(m) for j in range(n)]
[(0, 0), (0, 1), (0, 2), (1, 0), (1, 1), (1, 2)]

where you would replace (i,j) with the Python/Sage version of your u_i[j]'s.

link

posted Oct 19 '11

Mike Hansen gravatar image Mike Hansen flag of United States
3880 23 46 84

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
Login/Signup to Post

Question tools

1 follower

Tags:

Stats:

Asked: Oct 18 '11

Seen: 82 times

Last updated: Oct 19 '11

powered by ASKBOT version 0.7.22
Copyright Sage, 2010. Some rights reserved under creative commons license.