Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

metapredicate unique
Colin Barker, an occasional poster here at comp.lang.prolog, recently
posted an interesting problem to alt.math.recreational.

[Dominoes on a chessboard]
http://groups.google.com/group/alt....ee3e53f8bebb15f

The problem is whether it's always possible to remove N squares from
an N by N chessboard (checkerboard) in such a way that it can be
tiled with dominoes in one and only one way.

This suggested to me the implementation in Prolog of a metapredicate
unique/1 which takes as an argument Goal and succeeds precisely if
Goal succeeds in exactly one way.

Determinism:
Even if backtrack points are left by "Goal" after its first success,
provided
there are no additional solutions found by backtracking, unique(Goal)
is
supposed to succeed.  unique(Goal) itself would be deterministic, ie.
it can succeed in at most one way.

Binding:
It would be desirable for the success of unique(Goal) to preserve the
bindings of the successful solution of Goal.  This is not an issue for
the metapredicate not, because not(Goal) never binds variables that
appear in Goal.

Efficiency:
It would be efficient if the search tree invoked to find the first
solution
to Goal was effectively continued from that point to assure no further
solutions exist.

regards, chip

Report this thread to moderator Post Follow-up to this message
Old Post
Chip Eastham
04-03-08 03:54 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Prolog archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:03 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.