Generate random numbers with conditions using maxima (cas)
up vote
1
down vote
favorite
I want to generate (multiple) random numbers from a given number class with extra conditions. (for automatic generation of exercises)
e.g.:
- generate "a" out of natural Numbers which are dividible by three
- generate "b" which is a rational number but not natural number
- generate "c" and "d" which are both prime numbers and "d" is at least twice as big as "c"
ideally also:
- generate "f" as a polynomyal function of grade 2
My plan is to write a little script that will be then run multiple times from maxima and maxima outputs new tasks (with their solutions) every time.
my idea (pseudocode)
a := random(natural_numbers) | rest(a / 3) = 0
solution := 1/3 + 2/a
and this would output an "a" that I can use to build the exercise as well as a "solution" that i can check against.
random maxima-software
add a comment |
up vote
1
down vote
favorite
I want to generate (multiple) random numbers from a given number class with extra conditions. (for automatic generation of exercises)
e.g.:
- generate "a" out of natural Numbers which are dividible by three
- generate "b" which is a rational number but not natural number
- generate "c" and "d" which are both prime numbers and "d" is at least twice as big as "c"
ideally also:
- generate "f" as a polynomyal function of grade 2
My plan is to write a little script that will be then run multiple times from maxima and maxima outputs new tasks (with their solutions) every time.
my idea (pseudocode)
a := random(natural_numbers) | rest(a / 3) = 0
solution := 1/3 + 2/a
and this would output an "a" that I can use to build the exercise as well as a "solution" that i can check against.
random maxima-software
you cant generate random natural uniformly distributed or unbounded because there is computational limitation in the number of ciphers a number can achieve. The best you can do is use a random number generator in a bounded set of naturals, by example choosing naturals from 1 to 100. Anyway this doen't seems the best stackexchange forum for this question
– Masacroso
Nov 18 at 0:59
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I want to generate (multiple) random numbers from a given number class with extra conditions. (for automatic generation of exercises)
e.g.:
- generate "a" out of natural Numbers which are dividible by three
- generate "b" which is a rational number but not natural number
- generate "c" and "d" which are both prime numbers and "d" is at least twice as big as "c"
ideally also:
- generate "f" as a polynomyal function of grade 2
My plan is to write a little script that will be then run multiple times from maxima and maxima outputs new tasks (with their solutions) every time.
my idea (pseudocode)
a := random(natural_numbers) | rest(a / 3) = 0
solution := 1/3 + 2/a
and this would output an "a" that I can use to build the exercise as well as a "solution" that i can check against.
random maxima-software
I want to generate (multiple) random numbers from a given number class with extra conditions. (for automatic generation of exercises)
e.g.:
- generate "a" out of natural Numbers which are dividible by three
- generate "b" which is a rational number but not natural number
- generate "c" and "d" which are both prime numbers and "d" is at least twice as big as "c"
ideally also:
- generate "f" as a polynomyal function of grade 2
My plan is to write a little script that will be then run multiple times from maxima and maxima outputs new tasks (with their solutions) every time.
my idea (pseudocode)
a := random(natural_numbers) | rest(a / 3) = 0
solution := 1/3 + 2/a
and this would output an "a" that I can use to build the exercise as well as a "solution" that i can check against.
random maxima-software
random maxima-software
asked Nov 18 at 0:19
Tobi
1062
1062
you cant generate random natural uniformly distributed or unbounded because there is computational limitation in the number of ciphers a number can achieve. The best you can do is use a random number generator in a bounded set of naturals, by example choosing naturals from 1 to 100. Anyway this doen't seems the best stackexchange forum for this question
– Masacroso
Nov 18 at 0:59
add a comment |
you cant generate random natural uniformly distributed or unbounded because there is computational limitation in the number of ciphers a number can achieve. The best you can do is use a random number generator in a bounded set of naturals, by example choosing naturals from 1 to 100. Anyway this doen't seems the best stackexchange forum for this question
– Masacroso
Nov 18 at 0:59
you cant generate random natural uniformly distributed or unbounded because there is computational limitation in the number of ciphers a number can achieve. The best you can do is use a random number generator in a bounded set of naturals, by example choosing naturals from 1 to 100. Anyway this doen't seems the best stackexchange forum for this question
– Masacroso
Nov 18 at 0:59
you cant generate random natural uniformly distributed or unbounded because there is computational limitation in the number of ciphers a number can achieve. The best you can do is use a random number generator in a bounded set of naturals, by example choosing naturals from 1 to 100. Anyway this doen't seems the best stackexchange forum for this question
– Masacroso
Nov 18 at 0:59
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3003001%2fgenerate-random-numbers-with-conditions-using-maxima-cas%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
you cant generate random natural uniformly distributed or unbounded because there is computational limitation in the number of ciphers a number can achieve. The best you can do is use a random number generator in a bounded set of naturals, by example choosing naturals from 1 to 100. Anyway this doen't seems the best stackexchange forum for this question
– Masacroso
Nov 18 at 0:59