Profile

austin_dern: Inspired by Krazy Kat, of kourse. (Default)
austin_dern

July 2025

S M T W T F S
   12345
6789101112
13141516171819
20212223242526
2728293031  

Custom Text

Most Popular Tags

(no subject)

Date: 2012-10-02 04:02 pm (UTC)
From: [identity profile] http://users.livejournal.com/_fluffy/
Oh, and here's the version which also finds the row values:

paytherent(X,[A,[B1,B2],[C1,C2],D],[A,B3,C3,D]) :- 
	permutation(X,[A,B1,B2,C1,C2,D]), 
	B2>B1, B1+B2 > A, B3 #= B1+B2,
	C2>C1, C1+C2 > B1+B2, C3 #= C1+C2,
        D > C1+C2.


You call it with paytherent(Pricelist,Order,RowTotals), and as always (for Prolog) pass in a _ to say you don't care about that parameter.
This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

Expand Cut Tags

No cut tags

Style Credit