Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to create 31-tuples with nonnegative entries that sum to 1

Hello. I would like to know how to create all 31-tuples (sequence of 31 numbers) whose entries are nonnegative and sum up to one. One such kind of tuple would be one where exactly one of the 31 entries is 1 and all of the other remaining 30 entries are 0.

How could I ask Sage to do this?

Thank you.

How to create 31-tuples with nonnegative entries that sum to 1

Hello. I would like to know how to create all 31-tuples (sequence of 31 numbers) whose entries are nonnegative real, nonnegative, and sum up to one. One such kind of tuple would be one where exactly one of the 31 entries is 1 and all of the other remaining 30 entries are 0.

How could I ask Sage to do this?

Thank you.