Challenge!

Okay it may not be very challenging if I am able to word this well enough so here goes.

I need someone to help me get to the bottom of a problem Im having with a numbers game. The game goes as follows, a player selects any 12 numbers out of a set (1-2-3-4-5-6-7-8-9-10-12-13-14-15-16-17-18-19-20-21-22-23-24), then 12 numbers are drawn at random from that set and the player can win in two ways, either by getting all 12 numbers right or by getting none right. The numbers are not repeated meaning there is only one number 1 and one number 2 and one number 3 and so on that can be selected on the play board..

Now this is where your assistance is needed. My task is to determine the risk of this game as in how players can develop techniques and formulas in order to increase their odds of winning.

There are several situations that we have found with this game, some of them include number frequency, balance of numbers drawn (often 6 of the first 12 numbers and 6 of the later 12 numbers are drawn), odds and evens seem to be picked rather evenly.

I've concluded that the biggest risk lies in a player developing one particular method of choosing 6 numbers from 1 thru 12, and 6 numbers from 13 thru 24 and then removing the opposite selections from their lists, since the game gives players two ways to win, get them all right or get none right youll still win so half or the number combinations can be eliminated without risk of lowering odds for the player.

Can somebody please use your computer/math skills to generate such a list for me and possibly show how many combinations are available if the rules I mentioned in the previous paragraph are applied. Remember, each number can only be chosen once, only choose 6 of the first 12 numbers and 6 of the last 12 numbers, then eliminate the opposite selections. (example: a player selects 1-2-3-4-5-6-13-14-15-16-17-18 on their play board, then 7-8-9-10-11-12-19-20-21-22-23-24 do not need to be played in order to guarantee a win for a player looking to maximize his odds)

This is not challenge. This is homework.
First, develop some code 'bout what you could think and then we give you the directions.
Good luck!
That would be a challenge, for me since I am not skilled in programming. I do risk management. That's why I'm asking for help.
I think I'm funny, so...

This looks like a complex new math problem -
You have to use imaginary numbers like "eleventeen".
Also, irrational numbers like "pie", your choice of flavour.
Finally remember that the "!" in "x!" stands for "factorial", not a backward negation...
Anybody able to offer some insight on how I can tackle this?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Subset question (math)</title>
</head>
<body>
<script type="text/javascript">

var
sets = [],
n, i, j, o;

for (n = 63; n < 4033; ++n) {
for (i = 0, j = 0, o = ''; i < 12; ++i) {
if ((n >> i) & 1) {
o += (j++ ? ', ' : '') + (i < 9 ? ' ' : '') + (i + 1);
}
}
if (6 === j) {sets.push(o);}
}
document.write('<pre>', sets.sort().join('<br />'), '</pre>');

</script>
</body>
</html>



How is that? I did not make it, somebody else did. But its a start right?
Umm that is html not c++
This one is very close, but I still cant eliminate the opposite combinations, any ideas? if I have 123456, I need 789101112 removed


/* Write JavaScript here */function combinations(numArr, choose, callback) {
var n = numArr.length,
c = [],
inner = function(start, choose_) {
if (choose_ == 0) {
callback(c);
} else {
for (var i = start; i <= n - choose_; ++i) {
c.push(numArr[i]);
inner(i + 1, choose_ - 1);
c.pop();
}
}
};
inner(0, choose);
}

var set = [1,2,3,4,5,6,7,8,9,10,11,12],
choices = 6,
combinationsArray = [],
callback = function(c){
combinationsArray.push(c.slice(0));
};

combinations(set, choices, callback);

document.write(combinationsArray.join('<br>'));
document.write('<hr>');
combinationsArray.length = combinationsArray.length / 2; // cut of the last half, which are opposites of the first half.
document.write(combinationsArray.join('<br>'));
Once again your code is in html and not c++, if you need help coding in html you may want to move this thread to the "lounge" section by editing your first post, or possibly by posting it on a HTML forum such as http://w3schools.invisionzone.com/ , http://www.htmlforums.com/ , http://forums.htmlhelp.com/ , or http://codingforums.com/html-css/
Umm that is html not c++
actually it's javascript
Last edited on
Well looks like it uses HTML and Javascript to me but either way it's not c++ and not everyone here will be able to help.
Topic archived. No new replies allowed.