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=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.224.215.194 with SMTP id hf2mr33685436qab.0.1367071750311; Sat, 27 Apr 2013 07:09:10 -0700 (PDT) X-Received: by 10.49.35.198 with SMTP id k6mr4198430qej.18.1367071750280; Sat, 27 Apr 2013 07:09:10 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!mx05.eternal-september.org!feeder.eternal-september.org!news.glorb.com!s14no88168qam.0!news-out.google.com!ef9ni25954qab.0!nntp.google.com!s14no88166qam.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 27 Apr 2013 07:09:10 -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: <87c89205-7fee-4d88-b4ab-08d26c03219b@googlegroups.com> Subject: Depth First Search of a Char_Matrix? From: Alex Injection-Date: Sat, 27 Apr 2013 14:09:10 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:15174 Date: 2013-04-27T07:09:10-07:00 List-Id: Below is Char_Matrix representation of the board game "Go". A 'W' represen= ts a white piece, a 'B' represents a black piece, and a '.' represents a em= pty space. Each black or white piece can either be alive or dead. A piece= is Alive is if it horizontally or vertically next to a '.' OR if it is hor= izontally or vertically next to another piece that is alive. You can think = of aliveness as being contagious. How can I use depth first search to coun= t the number of alive black pieces and alive white pieces? =20 WW.BB .WWWW WWBBB BBBWW WWBW. In this example there are 11 alive white piece and 2 alive black pieces. Can anyone provide any insight into this problem?