Thread: Personal Project

  1. #16
    Registered User
    Join Date
    May 2010
    Posts
    4,632
    Don't forget that some lotteries use a "manual" system to "pick" the numbers. For example a bunch of numbered ping-pong balls in an air chamber popping out numbered balls.

    Jim

  2. #17
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    I'm sure it does too but there's no way to know which numbers they will be specifically.

    I think the problem can be attacked like this because the TC didn't talk about the abstraction first :

    You need to sell tickets to make money
    You need to have people win so they still play

    Chances of winning grow directly with number of people losing. If the chance of losing is n then the chance of losing m times in a row goes as n^m and because n < 1, n^m gives us an idea of how many tickets we can sell before someone is likely to win.

    I'm not sure how what the range on each lottery number is but you can calculate each permutation and its probability. But isn't each permutation given equal probability essentially making this a problem that can only be solved in regards as to when it's likely someone will win the lotto instead of which numbers specifically will win?

    If you sell x tickets a day, there's only so many days before it's likely someone wins.

  3. #18
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by MutantJohn View Post
    I'm sure it does too but there's no way to know which numbers they will be specifically.
    Not directly, no. But given the distribution, you can calculate how probable it is for each number to appear, thereby giving you a guessing chance.

    But isn't each permutation given equal probability essentially making this a problem that can only be solved in regards as to when it's likely someone will win the lotto instead of which numbers specifically will win?
    No, because the probability for each number is not necessarily the same. That is, the chance of losing is actually a function that depends on the numbers you pick.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  4. #19
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    Right... I realized that after I posted. Do they even make it publically available what type of number distribution they use for the lotto? You think that'd be the kind of thing they'd keep under wraps.

    This software is also self-defeating in the sense that it defeats the purpose of a lotto. The lotto only works because you have a lucky shot at winning. If you guaranteed the outcome, the game would be over so if this software worked, it'd be useful for like a week before there is no more lottery.
    Last edited by MutantJohn; 11-25-2014 at 11:47 AM.

  5. #20
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    I've watched the Michigan lottery and they select the winning numbers from a machine that bounces balls around. Good luck guessing the daily 4 or anything like that, given the circumstances.

  6. #21
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    I'm pretty sure that each machine (whether mechanical, electrical or electronic) will have passed every test for randomness going (and continues to pass the tests).

    Otherwise, the operators would soon find themselves out of business.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  7. #22
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    Quote Originally Posted by Salem View Post
    I'm pretty sure that each machine (whether mechanical, electrical or electronic) will have passed every test for randomness going (and continues to pass the tests).

    Otherwise, the operators would soon find themselves out of business.
    Check your post count. You're only a few away from an important milestone.
    What can this strange device be?
    When I touch it, it gives forth a sound
    It's got wires that vibrate and give music
    What can this thing be that I found?

  8. #23
    Registered User
    Join Date
    Sep 2013
    Location
    Jamaica
    Posts
    134
    Sorry for the long reply, had classes. This code isn't suppose to give exact ticket that will show as the winning number, what it does is to increase probability of achieving the winning ticket. There is a total of about 390M(its a little less just rounding off) that's what the combinations.cpp codes finds for us. The point is to virtually purchase 500M tickets then determine the most commonly repeated tickets since there is only 390M possible tickets so there will be a repetition of over 100M tickets then show the top 100 most likely numbers to be win. Its a long shot but theoretically its a gold mine but time is the enemy here.

  9. #24
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    How are you purchasing these virtual tickets? Are you just making a ticket structure and assigning random values to it? How are you creating these tickets?

  10. #25
    Registered User
    Join Date
    Sep 2013
    Location
    Jamaica
    Posts
    134
    Exactly, what better way to try to pin point a random set then random sets.
    Attached Files Attached Files

  11. #26
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    I don't think your abstractions are correct.

  12. #27
    Registered User Alpo's Avatar
    Join Date
    Apr 2014
    Posts
    877
    Under what condition would one number be more likely than another number?
    WndProc = (2[b] || !(2[b])) ? SufferNobly : TakeArms;

  13. #28
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Lottery winning strategies are a dime a dozen. All are scams, or completely wrong. There is no way to predict a random outcome. Prediction and randomness are opposite concepts.

    Your algorithm could only have any hopes of achieving something if it worked out the exact conditions of the initial state of the system where the random numbers will be generated along with the physical events that would subsequently take place. For example, if you could calculate with precision the path of each ball inside the dome before it gets tossed out.

    What you are trying to do is to predict a distribution of tickets that could ensure a winning ticket. Assuming you could even have access and buy those tickets with the numbers you predicted, that strategy is so financially ruinous that only complete idiots can consider giving it a try. You will still end up with a bunch of tickets with only a slightly better chance of winning. You will still lose millions of times more than you will win, and your algorithm will just be another piece of junk to add to the other piece of junk algorithms of the people that did it before you. That's right. Many did this already before you. Do you know of anyone winning the lottery because of it?
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  14. #29
    [](){}(); manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    *nullptr
    Posts
    2,657
    Quote Originally Posted by Mario F. View Post
    Do you know of anyone winning the lottery because of it?
    (I don't disagree with the rest of your post..but)
    Would you tell anyone if you did end up winning a lottery with math?
    It would quickly turn into a controversial news.
    "Maybe you got lucky?"
    "Do you have any connections to the organizers?"
    I am not sure if I would.

  15. #30
    Registered User
    Join Date
    Sep 2013
    Location
    Jamaica
    Posts
    134
    I'm just gonna close the project for now.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 08-02-2013, 06:45 PM
  2. Need personal help
    By Liger86 in forum Projects and Job Recruitment
    Replies: 1
    Last Post: 10-22-2010, 04:42 PM
  3. Ideas for a Personal Fun Project
    By Soulzityr in forum C Programming
    Replies: 2
    Last Post: 04-12-2010, 03:29 PM
  4. Personal project
    By zacs7 in forum General Discussions
    Replies: 12
    Last Post: 11-26-2009, 10:31 PM