用户名: 密码:
新用户注册
监管者: toedder 
 Computers

Have computer questions, hints, or tips?

BBW's Tips on how to speed up page load the brainking site
Computers (BIG BAD WOLF, 2007-03-12 20:16:01)


每页的消息:

cheap notebooks有什么新的?
讨论板列表
您未权限在该板张贴消息。只有最低脑象级别的会员才允许张贴在该板。
状态: 所有人能发表
帖子搜索:  

7. 八月 2006, 10:03:34
Walter Montego 
题目: Dealing the four cards up on the first hand in Building
Walter Montego修改(7. 八月 2006, 10:07:31)
I posted this on the tournament board, but it's really more of a problem for a computer to solve, though it can be done with paper and pen. I'd appreciate any help or ideas for a solution and it might also be a fun type of problem for someone to work on or solve. Or copy it and send to a friend you think might know how to solve it. ==================================
>>

I have something I've not worked on in awhile and I wasn't able to figure it out when I did work on it. I am wondering if you or someone else might be able to point out to me where I'm going wrong, or solve it yourself and show me the numbers for me to check and explain how you did it. At least to its completion with the exact number of possible deals, not approximations. It involves the dealing of the first hand in a game of Building. After the first hand is dealt the dealer faces four cards to the table. Similar to what is done in the game Cassino, if you're familiar with that game as I doubt if you know Building, but it doesn't really matter what game it is to understand this problem. The number of cards dealt to each player is seven if they're playing two handed, but that shouldn't have any baring on it either. You could just take a deck of playing cards made for Building and deal the top four cards off the top to solve this problem. But if you need details to help I will gladly supply them. This might not be exactly on topic for this discussion board, but I am the tournament director and get asked about the deal of the four cards and the odds related to the turning of a Jack or Joker or more when someone is dealing. The other problem related to this one is what are the odds and the number of hands turned up when the four cards can taken in one turn by the non-dealer on his first turn. I'll get to the details of that, if you can help me with the turned up cards first. The clearing of the table, if you or someone else is interested in it, can be done through messages or some other board unless it is appropriate on this one. I can solve it through brute force methods and using the fingers on my hands, I've just never attempted to do it as yet.

Anyways, back to the turning up of the four cards. The deck of cards used to play Building is the 52 standard deck used for Bridge or Poker plus two Jokers, for a total of 54 cards. When the dealer finishes dealing the players their first hand he faces four cards to the table between them. If any of the four cards turned up is a Joker or a Jack, the card or cards are set aside and another is dealt up to replace each one. If the replacement card is also a Jack or Joker, it too is set aside and another card is dealt up. Since there's four Jacks and two Jokers, the maximum number of cards set aside is six. None or one is the common amount, with two happening on occasion. The most I've ever seen is five and I've seen that three times, but then I've played thousands of games of Building. I've never seen all six turned up, but I'm sure it's possible.

What I've had trouble figuring out in this problem is how many different ways can each amount of Jacks and Jokers be turned up exactly. In Five Card Stud Poker there's an exact number of ways you could have a four of a kind dealt to you and it's not 13, but 624. That's always a good one to puzzle people with. There's 40 straight flushes in Poker that are easily countable on one's hands, no calculator required and they think only 13 four of a kinds, so why does a straight flush rank as the higher hand if there's more of them? I'm old school, a royal flush is a straight flush and not a seperately ranked hand as is now commonly shown in Poker charts. The best straight flush, but still just a straight flush.

It's fairly easy to figure out how many times the four cards will not have any Jacks or Jokers. Since there's 6 cards that are Jacks or Jokers, that leaves 48 that aren't. The first turned up could be any of those 48, the second would be one of the 47 left, the third one of the 46, and the fourth one of the 45. Since these can be dealt in any order, you need to divide the product of these numbers by the number of ways one can group 4 things, which is 24.
48 × 47 × 46 × 45 ­­÷ (4 × 3 × 2 × 1) = 194,580
This can be written 48!/4!44! if you have one of them calculators that does the factorials on it. I'm used to paper and pen, but calculators handle big numbers pretty good nowadays with exact numbers and not approximations. Seems like there's a calculator built right into the computer too. Oh yeah, a computer's original use!

OK, that's easy and I'm sure it's the correct and exact amount of different times the four cards can be turned up without a Jack or Joker amongst them. What happens when one one of the four cards is a Jack or Joker?
48 × 47 × 46 × 6 ÷ (3 × 2 × 1 × 1) = 103,776
or written (48!6!)/(45!3!5!1!)
For two I have 48 × 47 × 6 × 5 ÷ (2 × 1 × 2 × 1) = 16920
or written (48!6!)/(46!2!4!2!)
For three I have 48 × 6 × 5 × 4 ÷ (1 × 3 × 2 × 1) = 960
or written (48!6!)/(47!1!3!3!)
For four I have 6 × 5 × 4 × 3 ÷ (4 × 3 × 2 × 1)= 15
or written (6!)/(4!2!)
So far this is easy enough to follow and can be done with some paper and a deck of cards while imagining different ways of cards being dealt or combinations of sets. The numbers themselves are kind of large, so a calculator comes in handy.

The first four cards can have 0 through 4 Jacks or Jokers in the total of all those different ways and there's an easy check for it too.
194580 + 103776 + 16920 + 960 + 15 = 316,251
The check is 54 × 53 × 52 × 51 ÷ (4 × 3 × 2 × 1) = 316,251
or written 54!/(50!4!)
So far nothing complicated once you see how this is done. My problem is what happens when the dealer finishes dealing the cards to have just four cards turned up that aren't Jacks or Jokers. The turning of the cards after the first four is dependent on the card turn up to replace a turned up Jack or Joker. The more Jacks and Jokers turned up, the more complicated it gets. I tried the two extremes, and maybe you can see what it is that I'm not understanding or overlooking.
The case of when just one Jack or Joker is one the first four cards is fairly straight forward. It happens 103,776 times out of 316,251, which happens about 32.8% of the time and is close to 2 to 1 against it in odds. This and the four cards not having any Jacks or Jokers 61.5% cover a little 94% of the four card combinations that can be dealt.

The case of one Jack or Joker in the first four cards:

The dealer sets it aside and deals another card. If it's not a Jack or Joker, he's done dealing the first hand. He shows the non-dealer the one card that was set aside and then faces it on the bottom of the deck for use later in the deal of the other hands remaining. It no longer matters for this problem. This fifth card that he turned up wasn't a Jack or Joker, so it had to be one the remaining 45 cards. This is the beginning of where I get confused in figuring out the exact number of ways this can happen. Should the number of deals where just one Jack or Joker was faced equal 103,776 × 45? Which is 4,669,920? Since it takes five cards to be dealt when this happens, we'll need to figure the case of one Jack or Joker based on a set of 5 cards, right?
Doing it as {48 × 47 × 46 × 6 ÷ (3 × 2 × 1)} × 45 = 4,669,920 is not the same thing as
48 × 47 × 46 × 45 × 6 ÷ 24 = 1,167,480 A quarter of the other number, but exactly the amount of ways one Jack or Joker can dealt out of a deck of 54 cards into a hand of five cards. Not only that, but the first number is larger than the group it comes from which is 3,162,510, the number of sets of 5 in 54 objects, 54!/(49!5!). I'm obviously missing something. This second number, 1,167,480 is the exact number of times just one Jack or Joker will come up in five cards, but is not the right number for this problem because it includes the case of when the first four cards contain no Jacks or Jokers and the dealing stops before a fifth card (The Jack or Joker) would be dealt. For some reason I think subtracting 194,580 from the any of these numbers will not yield the right answer, though it might be the thing to do with 1,167,480 and get 972,900.

The other extreme is taking the first four cards to be all Jacks and Jokers. This happens 15 times out of 316,251. About .0047% of the time at odds of 316,236 to 15 or exactly 21,082.4 to 1 against. Yep, that doesn't happen much. I can't remember if I've ever seen that happen or not. I have seen four Jacks turned up, but that was after turning some replacement cards for some of the earlier Jacks.

The case of all four of the first four cards being Jacks or Jokers:

In this extraordinary event, the dealer (besides smiling and looking forward to the last hand of the deal), would set all four of the cards to the side and turn up four more cards. If none of these four replacement cards are Jacks or Jokers, he's done dealing the first hand. He picks up the four cards set aside and places them face up on the bottom of the deck for use later in the deal during the last hand.
Just how many times can this happen? It'd seem to be 15 × 194,580 which is 2,918,700. I believe this number might be correct for this particular example, but it isn't number for how many times the dealer might turn up exactly 4 Jacks or Jokers. There are a lot of ways that the dealer might indeed turn up exactly 4 Jacks or Jokers while dealing the four cards to the table. He could deal one Jack or Joker and three other cards in the first four cards and then turn up three consecutive Jacks and Jokers as replacements and then a fourth card not a Jack or Joker, or he could turn up 3 Jacks or Jokers in the first four cards and deal in a number a ways just one more Jack or Joker before getting four cards that aren't Jacks or Jokers. I tried to make a tree diagram for these choices in dealing each replacement card when this situation occurs and I went crazy! It's in the archives somewhere as I haven't worked on this in over fifteen years. When I got the tree diagram to the chance of having all 6 Jacks and Jokers turned up on the deal of the first hand, I had branches everywhere and an impossibly high number of occurances for what would be the rarest event of this deal to happen. The branches stop when 4 cards that aren't Jacks or Jokers are dealt, but go on to a possible ten cards if all the Jacks and Jokers we to be dealt.

My brother saw me working on this problem years ago and came up with a solution that I didn't like as it didn't cover every possible deal or have the exact number of deals for each combination of Jacks and Jokers turned up. He just programmed a computer to randomize 54 numbers and then pretend to deal until there was four numbers not 49 through 54. He had the computer tally each deal and then do it again. He had the computer run all night and then gave me the percentage for 0, 1, 2, 3, 4, 5, 6, Jacks or Jokers being dealt. Definitely not a mathematician's answer, but he's an engineer and didn't see why I wanted exact numbers. His approach did give me an idea for counting the number of ways the four cards and the Jacks and Jokers could be determined. Seeing how he did this over twenty years ago and computers are lots faster nowadays, my idea might actually be practical today. Just have the computer methodically count and go through each possible combination of dealing the cards. Since the first four cards when dealt without a Jack or Joker total is known precisely, you could even skip that part and just do the counting from when one or more are turned up.

Anyways, there's my problem and I'd certainly like some help on it and a way to check the numbers. And of course, any new approach to solving it, or how you solved it would be greatly appreciated. Also, if you'd like the details for the clearing of the table's original four cards by the non-dealer or eldest hand, just ask and I'll get it to you.

Thank you for your help

24. 六月 2006, 10:56:16
Walter Montego 
题目: Re: Spell Checker
Summertop: A good dictionary within arm's reach of the computer keyboard. Works for me quite well.

14. 四月 2006, 03:45:45
Walter Montego 
题目: Re:
Pedro Martínez: Would that necessarily prove it? I was told I get a different one each time I log onto the internet because I use AOL. I don't know what an IP address is. Are they specific to a single phone line? How large of an area would one overlap? Could a neighbor of mine have the same one? In the same house? What about people that play in different locations? I've played from Reno, Nevada before. What about people that use a cable modem or DSL to access the internet? Would the cable system have the same IP for the whole city?

10. 四月 2006, 08:47:27
Walter Montego 
题目: Re: IM
Does AOL block yahoo's instant message service?

8. 一月 2006, 11:03:26
Walter Montego 
题目: Oops
I mean my write and erase device. I usually use my write only device on my non-volatile storage medium, but sometimes a pencil works better when the need to erase might be desirable.

8. 一月 2006, 11:00:35
Walter Montego 
题目: You'd better make it two pencils!
You know, just to be on the safe side. And throw in a sharpener, too.

7. 十月 2005, 00:02:45
Walter Montego 
题目: Re:
Summertop: What about the other F? :)

Hey, where's your subscript?

27. 九月 2005, 18:23:12
Walter Montego 
题目: Re:
Walter Montego修改(27. 九月 2005, 18:25:16)
Fencer: I just retired my 486 a few months ago. I got the computer used in 1995. Though I usually just used AOL's browser I did have NetScpae 4.08 on it. This was from before NetScape went out of business because of Microsoft adding their browser to their Windows program. I think AOL ending up buying NetScape and released a 6.0 version (Skipping the 5.0 series of numbers), but I don't know if NetScape as owned by them is around any more.
That old computer is why I started playing on turned based sites. I couldn't keep up on live sites against newer computers and broadband. Having this new computer sure makes it a lot easier to play here now. Pages load lots faster. If I ever go back to the DSL or another broadband set up, I'm sure that will really get me some fast loading.

20. 八月 2005, 10:09:26
Walter Montego 
题目: Re: Dust Off
Walter Montego修改(20. 八月 2005, 13:09:50)
Foxy Lady: Aside from telling me a thing about using this product in a way I hadn't thought of, I do not see what it has to do with computers. It's mostly written in a very biased and anti-drug misinformation style regardless how often this might have happened (Yeah, lawn darts are a threat too) but really, where's the facts? Our society just doesn't know anything if one stops to think about it. Can we not think critically any more? Marijuana has never, and I mean never ever, killed anyone. And believe you me, we know the government has been searching for the dangers to marijuana for a long time. Skydiving kills people every year. Which one is legal? Does this make sense? And don't tell me jumping out of an airplane doesn't get the jumpers high! It is an expensive hobby and takes the diver away from his family. If he dies while skydiving, a lot of insurance companies won't pay, or make him pay more for coverage, again hurting his family. I see so much hypocracy in our society in its handling of things, I cannot but wonder where it's leading us. I can legally buy a crossbow or a Berreta 9mm gun, but nowhere are new Lawn Darts to be found?! Whiskey is legal and marijuana isn't? Now you've told me about some aerosol product that can be used like this. If anything, you're making the problem worse because some people will now try it out that hadn't even considered such a use. Police officers, and especially the ones that go to various schools and proselytize about the dangers of society posed to our children, are about the least credible people I know of when I'm seeking answers to a question. They have a mission and they will tell you want they want without giving you all the facts to make an informed decision. It is because of them and the lies told to me about drugs that I had to independently reseach this for myself. They lied. One thing they were right about is that drug laws are trouble. What they don't tell you is that it's not the drugs that are the trouble! Breaking the law is the trouble. That, and the main thing that is always left unaddressed. Why take drugs in the first place? Why not teach people how to take drugs safely? This whole thing about not taking drugs is the biggest hypocracy of all. If a drug company sells it, it's OK? That's what I gather from watching television anyway. You're sad? Take this. You're anxious? Take this. You have erection problems? Take this. Can't lose weight? Take this. Trouble sleeping? Take this. Depressed? Take this. When one is really sick, that's when you need drugs to cure what ails you. If I want to take drugs just to see what they'll do to me or if I want to repeat a previous experience, what's the deal and why is it any of your business? Why is this activity against the law? What is the logic to throwing someone in jail for drug use that's not for medicinal reasons? If you don't like drugs, the solution is easy. Don't take them. Keep your non-drug use to yourself and leave me alone. Reality is for people that can't handle drugs. Believe me, I've seen enough friends and acquantices lives ruined from irresponsible drugs use. They made a choice and were stupid in the exercise of their choice. I've also seen people that have no problem using drugs, or even benefit from their use. People can and will get their drugs. The most controlled place in society is prison, right? And yet, a prisoner can get drugs. Do we want to lock our whole society down just because some people don't like others getting high? We have plenty of laws dealing with people misbehaving, we do not need drug laws. It amazes me that our country didn't learn this lesson from the Prohibition era. It should be apparent that what we're doing now isn't working and it's making criminals out of a lot of otherwise law abiding citizens. Why penalize people that can use drugs responsibly?Criminalizing a product that has a very large demand creates crime where a crime didn't previously exist. It also causes corruption amoung law enforcement. I want the police to enforce laws that are made to protect me from real criminals, like burgulars, carjackers, extortionists, shysters, and shady politicaians. What harm is caused to me from someone smoking a joint or shooting heroin? Why throw them in jail? Drug laws also lessen the respect for other laws. And don't forget about our freedoms lost when the cops use the facade of drugs to stop or search you and say it is because you fell into the profile of a drug dealer or some other "reason". If people could buy the drugs they wanted down at Sav-on or their local pharmarcy as they do with buying their other prescriptions, or even down at a 7-11 if we really made it easy to get them, it would immediately eliminate drug cartels, drug gangsters, and cops on the take. It would not eliminate drug abuse or problems caused by irresponsible drug use, but at least we'd not have our prisons full of people who on the main are hurting no one or only hurting themselves. It would save lives since the quality of the drugs and the dose would now be known quantities for the users. We could certainly modify the tort laws so that people that use a drug for recreational uses would not be allowed to sue the sellor or manufacturer and said user could also be made fully responsible for all of his actions and not be able to use the fact he was high at the time to get off the hook.

Coincidentally, I have a cat named Thor.

17. 八月 2005, 23:02:01
Walter Montego 
题目: Re: Newbie Proxomitron hints
Shreela: Thank you for you post Shreela. I'll save it and try out some of the things you talk about in it sometime soon.

I have a question about this bypass that you've done to BrainKing. If I do that, will I be able to change the icon of the Janus too? Or is it one or the other?

17. 八月 2005, 20:57:48
Walter Montego 
题目: Re: Proxomitron and HTML
Shreela: I can do that, but what does that have to do with Proxomitron?

13. 八月 2005, 21:09:19
Walter Montego 
题目: Re: Proxomitron and HTML
Walter Montego修改(13. 八月 2005, 21:11:42)
playBunny: I've learned a little about HTML code from trying to print out on a single page the NASCAR line ups and race results without all the banners and extraneous stuff that comes with the page. For a couple of years I have asked people how I could just print it out without that stuff and I never got an answer that helped. Plus if I could do it on one page instead of two, it'd save paper and time for me having to cut and tape it together. So I finally just downloaded the whole page and then viewed the page with WordPad®, started deleted things, and observing the change. This worked using trail and error, but I have little idea about how to add things to the HTML code or change them. At least I've seen what the code looks like and have an idea about what things do. I haven't a clue about the table functions of HTML code, but I've found out about the type font and size and what is to be printed out. I'd need to learn about the various structure things of it to do that. I'm sure who ever inputs the data at NASCAR just types it into a form and voila! instant page.

I'll downlaon the Proxomtiron after I make a few mores move. Should I get it with the install or not. I was planning on get it without the install as it says it's all in one file and there's no reason to have it installed. Should I do as I planned or get the installed version? I was going to get the June version instead of the May version.

13. 八月 2005, 20:56:56
Walter Montego 
题目: Re: Proxomitron
playBunny: My post for playBunny's answer. Hey, they'll be in top down form this time.

miuek: Proxomitron! Now that's amazing. I've read the help files and contents. This program has lots of uses. Just from reading it I wouldn'tve guessed you could do what you said about changing the way my board looks while using this site. How'd you make the connection to do so? Is what you say easy to do with the Proxomitron? I'd like to use a different icon for the Janus in Janus Chess than what is used on this site. Is this something I could change with the Proxomitron? How would I do it, if it is something I can change?

日期和时间
在线的朋友
最喜欢的讨论板
朋友群
每日提示
Copyright © 2002 - 2024 Filip Rachunek, 版权所有
回顶端