VoyForums
[ Show ]
Support VoyForums
[ Shrink ]
VoyForums Announcement: Programming and providing support for this service has been a labor of love since 1997. We are one of the few services online who values our users' privacy, and have never sold your information. We have even fought hard to defend your privacy in legal cases; however, we've done it with almost no financial support -- paying out of pocket to continue providing the service. Due to the issues imposed on us by advertisers, we also stopped hosting most ads on the forums many years ago. We hope you appreciate our efforts.

Show your support by donating any amount. (Note: We are still technically a for-profit company, so your contribution is not tax-deductible.) PayPal Acct: Feedback:

Donate to VoyForums (PayPal):

Login ] [ Contact Forum Admin ] [ Main index ] [ Post a new message ] [ Search | Check update time ]
Subject: Optimal strategy


Author:
Hjlmtr
[ Next Thread | Previous Thread | Next Message | Previous Message ]
Date Posted: 15:36:59 02/12/04 Thu

a kom fram spurning eftir fyrirlesturinn morgun um hegun "optimal strategy" aferarinnar til a spila Nim.
g svarai v ekki alveg rtt, annig a hr kemur nkvmara svar.

Segjum a staan s s a rjr hrgur s me 4, 5 og 2 steina hver. er tvundartgfur essara talna XOR-aar saman:

4: 0100
5: 0101
2: 0010
--------
tk: 0011

Ef vi XOR-um tkomuna vi hin gildin fum vi hvert nja gildi hrgunni arf a vera til a XOR-unin llum gildunum gfi 0000. etta nja gildi m auvita ekki vera meira en gamla gildi hrgunni, v urfum vi a BTA vi steinum, en vi megum bara taka burt steina.

Skoum XOR-un tkomunnar vi gildi einstakra hrga:
Hrga 1: 0100^0011=0111, nja gildi er v 7, sem er meira en gamla gildi, sem var 4, svo etta gengur ekki. Hrga 2: 0101^0011=0110, nja gildi er 6, en gamla gildi var 5, svo etta gengur ekki. Hrga 3: 0010^0011=0001, nja gildi er 1, en gamla gildi var 2. etta er v lagi. Ef vi tkum einn stein t r hrgu 3 er XOR-tkoma allra gildanna:

4: 0100
5: 0101
1: 0001
--------
tk: 0000

Vi erum v essari eftirsknarveru stu.

a m rekja sig gegnum allar hrgurnar og prfa etta, en a er reyndar ng a fara beint eina af eim hrgum sem hafa 1-bita sama sti og efsti 1-bitinn er tkomunni. Hr a ofan var 3ja hrgan s eina sem hafi 1-bita ru stinu fr hgri, sem var efsti bitinn tkomunni.

g vona a etta skiljist, amk. af eim sem hafa eitthva sp essa afer.

[ Next Thread | Previous Thread | Next Message | Previous Message ]


Post a message:
This forum requires an account to post.
[ Create Account ]
[ Login ]
[ Contact Forum Admin ]


Forum timezone: GMT+0
VF Version: 3.00b, ConfDB:
Before posting please read our privacy policy.
VoyForums(tm) is a Free Service from Voyager Info-Systems.
Copyright © 1998-2019 Voyager Info-Systems. All Rights Reserved.