From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,af4868d4b196fa50,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.180.198.179 with SMTP id jd19mr4967752wic.5.1367290138314; Mon, 29 Apr 2013 19:48:58 -0700 (PDT) X-Received: by 10.49.119.99 with SMTP id kt3mr4612791qeb.22.1367290137831; Mon, 29 Apr 2013 19:48:57 -0700 (PDT) Path: p18ni46530wiv.0!nntp.google.com!bx2no8716011wib.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 29 Apr 2013 19:48:57 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=134.240.94.19; posting-account=CZZpzgoAAAAoaHoNNp9zhY9EzQgEmxhU NNTP-Posting-Host: 134.240.94.19 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <6c3bb45c-6cb1-4609-9c3f-c3f01c545eac@googlegroups.com> Subject: Breadth First Search Missionaries and Cannibals From: Alex Injection-Date: Tue, 30 Apr 2013 02:48:58 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2013-04-29T19:48:57-07:00 List-Id: Given the following Function signature how would I go about using breadth f= irst search to find out the minimum number of trips it would take to get al= l the missionaries and cannibals across the river. *MUST USE BREADTH FIRST = SEARCH* If you are not familiar with the problem see the wiki page here : = =20 http://en.wikipedia.org/wiki/Missionaries_and_cannibals_problem The only difference between the problem in the wiki article is in this one = the number of missionaries and cannibals and the number of people the boat = can hold can change. M is missionaries, C is cannibals and R is the number of people you can fit= in the boat. =20 function Min_Crossings(M, C, R : Integer) return Integer is -- you can assume M, C, and R are all >=3D 2 and C <=3D M begin return -999; end Min_Crossings; Thanks a bunch.