-2

OK. this might be a very basic question to please don't flame me but I have been googling I want to learn how to write solutions to transportation problems like Wolf, Cabbage, and Goat or traveling salesman using F#

so far my research has taken me to these resources on the web

http://mat.gsia.cmu.edu/orclass/integer/integer.html

http://www.zib.de/Publications/Reports/SC-95-27.pdf

Fox-Goat-Cabbage Transportation

http://www.qauprogrammers.com/Article/File-192324030/PROLOG-Programming-with-NET

but despite reading thru these, I have not been able to "think" on how should such a problem be solved in F# type of language

Community
  • 1
  • 1
Knows Not Much
  • 30,395
  • 60
  • 197
  • 373
  • So what is your question exactly? Your title talks about C# or F#, but you seem to be concerned about integer / combinatorial optimization types of problems. – Mathias Jul 13 '12 at 16:04
  • You need to expand a bit more on what you have done. Your references are good, but all that you have quoted for your work is a handful of problems. For example, have you solved the language in an imperative language before? Do you have a sample? Have you tried the typical basic conversion methods? (loops -> recursion, minimizing stateful objects etc.) – Guvante Jul 13 '12 at 16:47

1 Answers1

3

I'd recommend going thru the excellent article Escape from Zurg: An Exercise in Logic Programming. Although the functional language of choice there is Haskell, it should give you enough ideas about programming of optimal search problems functionally.

Also Escape from Zurg in Scala has full source code easily portable to F#.

Gene Belitski
  • 10,270
  • 1
  • 34
  • 54