<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Форум компьютерной помощи &mdash; Примеры программ на PROLOG]]></title>
		<link>https://itpmr.ru/viewtopic.php?id=737</link>
		<atom:link href="https://itpmr.ru/extern.php?action=feed&amp;tid=737&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «Примеры программ на PROLOG».]]></description>
		<lastBuildDate>Fri, 21 Dec 2012 15:00:28 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Примеры программ на PROLOG]]></title>
			<link>https://itpmr.ru/viewtopic.php?pid=123762#p123762</link>
			<description><![CDATA[<p>predicates<br />&nbsp; &nbsp; sum(integer,real)<br />&nbsp; &nbsp; cosinus(integer,real)<br />&nbsp; &nbsp; sum(real,real,real,real)<br />clauses<br />&nbsp; &nbsp; cosinus(Y,R):-A=ln(1),B=Y*A,St=exp(B),R=cos(St).<br />&nbsp; &nbsp; sum(N,R):-sum(N,R,1,0).<br />&nbsp; &nbsp; sum(N,R,N,R):-!.<br />&nbsp; &nbsp; sum(N,R,L,P):-cosinus(L,R1),L1=L+1,<br />&nbsp; &nbsp; P1=P+R1,<br />&nbsp; &nbsp; sum(N,R,L1,P1).&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />goal<br />&nbsp; &nbsp; sum(5,R1).</p>]]></description>
			<author><![CDATA[null@example.com (admin)]]></author>
			<pubDate>Fri, 21 Dec 2012 15:00:28 +0000</pubDate>
			<guid>https://itpmr.ru/viewtopic.php?pid=123762#p123762</guid>
		</item>
		<item>
			<title><![CDATA[Re: Примеры программ на PROLOG]]></title>
			<link>https://itpmr.ru/viewtopic.php?pid=123761#p123761</link>
			<description><![CDATA[<p>predicates<br />&nbsp; &nbsp; sum(integer,real)<br />&nbsp; &nbsp; member(integer,real)<br />&nbsp; &nbsp; sum(real,real,real,real)<br />clauses<br />&nbsp; &nbsp; member(Y,R):-A=2*Y,B=A+1,R=A/B.<br />&nbsp; &nbsp; sum(N,R):-sum(N,R,N,1).<br />&nbsp; &nbsp; sum(N,R,0,R):-!.<br />&nbsp; &nbsp; sum(N,R,L,P):-member(L,R1),<br />&nbsp; &nbsp; L1=L-1,<br />&nbsp; &nbsp; P1=P*R1,<br />&nbsp; &nbsp; sum(N,R,L1,P1).&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />goal<br />&nbsp; &nbsp; sum(2,R1).</p>]]></description>
			<author><![CDATA[null@example.com (admin)]]></author>
			<pubDate>Fri, 21 Dec 2012 14:56:00 +0000</pubDate>
			<guid>https://itpmr.ru/viewtopic.php?pid=123761#p123761</guid>
		</item>
		<item>
			<title><![CDATA[Re: Примеры программ на PROLOG]]></title>
			<link>https://itpmr.ru/viewtopic.php?pid=123760#p123760</link>
			<description><![CDATA[]]></description>
			<author><![CDATA[null@example.com (admin)]]></author>
			<pubDate>Fri, 21 Dec 2012 14:55:44 +0000</pubDate>
			<guid>https://itpmr.ru/viewtopic.php?pid=123760#p123760</guid>
		</item>
		<item>
			<title><![CDATA[Re: Примеры программ на PROLOG]]></title>
			<link>https://itpmr.ru/viewtopic.php?pid=123759#p123759</link>
			<description><![CDATA[<p>predicates<br />&nbsp; &nbsp; r(long)<br />&nbsp; &nbsp; %r(unsigned, long,unsigned, long)<br />&nbsp; &nbsp; do<br />clauses<br />&nbsp; &nbsp; %r(N, NewPr):- r(N, NewPr,1,1).<br />&nbsp; &nbsp; %r(N, NewPr,N, NewPr):- !.<br />&nbsp; &nbsp; r(X):- X&gt;100,write(&quot;\nNO\n&quot;),!.<br />&nbsp; &nbsp; r(X):- X=81,write(&quot;\nYES\n&quot;),!.<br />&nbsp; &nbsp; r(X):- NewX=X*X,%write(NewX),<br />&nbsp; &nbsp; r(NewX).</p><p>&nbsp; &nbsp; do:-write(&quot;Ввведите &quot;), readint(X),&nbsp; &nbsp;r(X). %write(&quot;Сумма=&quot;, Pr,&quot;\n&quot;).<br />goal<br />&nbsp; &nbsp; do.</p>]]></description>
			<author><![CDATA[null@example.com (admin)]]></author>
			<pubDate>Fri, 21 Dec 2012 14:54:18 +0000</pubDate>
			<guid>https://itpmr.ru/viewtopic.php?pid=123759#p123759</guid>
		</item>
		<item>
			<title><![CDATA[Re: Примеры программ на PROLOG]]></title>
			<link>https://itpmr.ru/viewtopic.php?pid=123758#p123758</link>
			<description><![CDATA[]]></description>
			<author><![CDATA[null@example.com (admin)]]></author>
			<pubDate>Fri, 21 Dec 2012 14:54:07 +0000</pubDate>
			<guid>https://itpmr.ru/viewtopic.php?pid=123758#p123758</guid>
		</item>
		<item>
			<title><![CDATA[Re: Примеры программ на PROLOG]]></title>
			<link>https://itpmr.ru/viewtopic.php?pid=123757#p123757</link>
			<description><![CDATA[<p>predicates<br />&nbsp; factorial(interger, real)<br />&nbsp; rez(integer)<br />clauses&nbsp; <br />&nbsp; factorial(1, 1) :- !.<br />&nbsp; factorial(X, FactX) :-<br />&nbsp; &nbsp; &nbsp; Y = X-1,<br />&nbsp; &nbsp; &nbsp; factorial (Y, FactY),<br />&nbsp; &nbsp; &nbsp; FactX = X*FactY*2.<br />&nbsp; rez(ZZ):-factorial(ZZ,FactX),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;A=FactX*2,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;write(&quot;Result&quot;,A),nl.<br />goal<br />&nbsp; rez(4).</p>]]></description>
			<author><![CDATA[null@example.com (admin)]]></author>
			<pubDate>Fri, 21 Dec 2012 14:53:14 +0000</pubDate>
			<guid>https://itpmr.ru/viewtopic.php?pid=123757#p123757</guid>
		</item>
		<item>
			<title><![CDATA[Re: Примеры программ на PROLOG]]></title>
			<link>https://itpmr.ru/viewtopic.php?pid=123756#p123756</link>
			<description><![CDATA[<p>predicates<br />&nbsp; &nbsp; f(real, real)<br />&nbsp; &nbsp; <br />clauses<br />&nbsp; &nbsp; f(1, 0.5) :- !.<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; f(X, FX) :-<br />&nbsp; &nbsp; &nbsp; &nbsp; Y = X-1,<br />&nbsp; &nbsp; &nbsp; &nbsp; f(Y, FY),<br />&nbsp; &nbsp; &nbsp; &nbsp; FX = (1-(1/(X*2)))*FY.</p><p>goal<br />&nbsp; &nbsp; X=10, f(X, FX).</p>]]></description>
			<author><![CDATA[null@example.com (admin)]]></author>
			<pubDate>Fri, 21 Dec 2012 14:53:07 +0000</pubDate>
			<guid>https://itpmr.ru/viewtopic.php?pid=123756#p123756</guid>
		</item>
		<item>
			<title><![CDATA[Re: Примеры программ на PROLOG]]></title>
			<link>https://itpmr.ru/viewtopic.php?pid=123755#p123755</link>
			<description><![CDATA[<p>/*</p><p>*/</p><p>predicates<br />&nbsp; &nbsp; sum(integer,real)<br />&nbsp; &nbsp; member(integer,real)<br />&nbsp; &nbsp; sum(real,real,real,real)<br />clauses<br />&nbsp; &nbsp; member(Y,R):-A=2*Y,B=A+1,R=A/B.<br />&nbsp; &nbsp; sum(N,R):-sum(N,R,N,1).<br />&nbsp; &nbsp; sum(N,R,0,R):-!.<br />&nbsp; &nbsp; sum(N,R,L,P):-member(L,R1),<br />&nbsp; &nbsp; L1=L-1,<br />&nbsp; &nbsp; P1=P*R1,<br />&nbsp; &nbsp; sum(N,R,L1,P1).&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />goal<br />&nbsp; &nbsp; sum(2,R1).</p>]]></description>
			<author><![CDATA[null@example.com (admin)]]></author>
			<pubDate>Fri, 21 Dec 2012 14:52:47 +0000</pubDate>
			<guid>https://itpmr.ru/viewtopic.php?pid=123755#p123755</guid>
		</item>
		<item>
			<title><![CDATA[Re: Примеры программ на PROLOG]]></title>
			<link>https://itpmr.ru/viewtopic.php?pid=123754#p123754</link>
			<description><![CDATA[<p>/* Простые процедуры построения дерева&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <br />&nbsp; &nbsp; create_tree (A, B) помещает A в поле данных одноузлового <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;дерева B&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <br />&nbsp; &nbsp;&nbsp; insert_left (A, B, C) вставляет A как левое поддерево B <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;и присваивает результат C&nbsp; &nbsp;&nbsp; <br />&nbsp; &nbsp;&nbsp; insert_right (A, B, C) вставляет A как правое поддерево <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;B и присваивает результат C */</p><p>&nbsp; &nbsp; domains<br />&nbsp; &nbsp;&nbsp; treetype = tree (string, treetype, treetype); empty ()</p><p>&nbsp; &nbsp; predicates<br />&nbsp; &nbsp;&nbsp; create_tree (string, treetype)<br />&nbsp; &nbsp;&nbsp; insert_left (treetype, treetype, treetype)<br />&nbsp; &nbsp;&nbsp; insert_right (treetype, treetype, treetype)<br />&nbsp; &nbsp; run</p><p>&nbsp; &nbsp; clauses<br />&nbsp; &nbsp;&nbsp; create_tree (A, tree (A, empty, empty)).<br />&nbsp; &nbsp;&nbsp; insert_left (X, tree (A, _, B), tree (A, X, B)).<br />&nbsp; &nbsp;&nbsp; insert_right (X, tree (A, B, _), tree (A, B, X)).</p><p>&nbsp; &nbsp; run:-<br />&nbsp; &nbsp;&nbsp; /* Сначала создадим несколько одноузловых деревьев*/</p><p>&nbsp; &nbsp;&nbsp; create_tree (&quot;Вова&quot;, V),<br />&nbsp; &nbsp;&nbsp; create_tree (&quot;Лида&quot;, Ld),<br />&nbsp; &nbsp;&nbsp; create_tree (&quot;Миша&quot;, M),<br />&nbsp; &nbsp;&nbsp; create_tree (&quot;Зина&quot;, Z),<br />&nbsp; &nbsp;&nbsp; create_tree (&quot;Петя&quot;, P),<br />&nbsp; &nbsp;&nbsp; create_tree (&quot;Люда&quot;, L),<br />&nbsp; &nbsp;&nbsp; create_tree (&quot;Катя&quot;, K),</p><p>&nbsp; &nbsp;&nbsp; /*...затем соединим их... */</p><p>&nbsp; &nbsp;&nbsp; insert_left (V, M, M2),<br />&nbsp; &nbsp;&nbsp; insert_right (Ld, M2, M3),<br />&nbsp; &nbsp;&nbsp; insert_left (Z, L, L2),<br />&nbsp; &nbsp;&nbsp; insert_right (P, L2, L3),<br />&nbsp; &nbsp;&nbsp; insert_left (M3, K, K2),<br />&nbsp; &nbsp;&nbsp; insert_right (L3, K2, K3),</p><p>&nbsp; &nbsp;&nbsp; /*...и печатаем результат. */</p><p>&nbsp; &nbsp;&nbsp; write (K3, &#039;\n&#039;).</p><p>goal<br />&nbsp; &nbsp; run.</p>]]></description>
			<author><![CDATA[null@example.com (admin)]]></author>
			<pubDate>Fri, 21 Dec 2012 14:52:31 +0000</pubDate>
			<guid>https://itpmr.ru/viewtopic.php?pid=123754#p123754</guid>
		</item>
		<item>
			<title><![CDATA[Re: Примеры программ на PROLOG]]></title>
			<link>https://itpmr.ru/viewtopic.php?pid=123753#p123753</link>
			<description><![CDATA[<p>/* Обход дерева &quot;сначала вглубь&quot; и печать каждого элемента, который попадается на пути. */</p><p>domains<br />&nbsp; &nbsp;&nbsp; treetype = tree (string, treetype, treetype); end()<br />predicates<br />&nbsp; &nbsp; writetree (treetype)<br />clauses<br />&nbsp; &nbsp;&nbsp; writetree (end).<br />&nbsp; &nbsp;&nbsp; writetree (tree (X, Y, Z)):-<br />&nbsp; &nbsp;&nbsp; &nbsp; write (X),<br />&nbsp; &nbsp;&nbsp; &nbsp; writetree (Y), <br />&nbsp; &nbsp;&nbsp; &nbsp; writetree (Z) ,T=+1, write(T).</p><p>goal<br />&nbsp; &nbsp;&nbsp; &nbsp;writetree&nbsp; (tree (&quot;Катя&quot;,&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;tree (&quot;Миша&quot;,&nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; tree (&quot;Вова&quot;, end, end),&nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; tree (&quot;Лида&quot;, end, end)),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; tree (&quot;Люда&quot;, <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; tree (&quot;Зина&quot;, end, end),&nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; tree (&quot;Петя&quot;, end, end)))),nl,fail;true.</p>]]></description>
			<author><![CDATA[null@example.com (admin)]]></author>
			<pubDate>Fri, 21 Dec 2012 14:52:23 +0000</pubDate>
			<guid>https://itpmr.ru/viewtopic.php?pid=123753#p123753</guid>
		</item>
		<item>
			<title><![CDATA[Re: Примеры программ на PROLOG]]></title>
			<link>https://itpmr.ru/viewtopic.php?pid=123752#p123752</link>
			<description><![CDATA[<p>domains <br />&nbsp; &nbsp; treetype = tree(string, treetype, treetype); empty()<br />&nbsp; &nbsp; argument=real<br />&nbsp; &nbsp; result=real<br />predicates<br />&nbsp; &nbsp; pp(treetype, integer)<br />&nbsp; &nbsp; print(treetype)<br />&nbsp; &nbsp; prob(integer)<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />clauses&nbsp; &nbsp; </p><p>&nbsp; &nbsp; prob(0):-!.<br />&nbsp; &nbsp; prob(N):-write(&quot;&nbsp; &nbsp; &quot;),N1=N-1, prob(N1).<br />&nbsp; &nbsp; print(empty).<br />&nbsp; &nbsp; print(tree(X, _, _)) :- write(X), nl, !.<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; pp(empty, _).<br />&nbsp; &nbsp; &nbsp; &nbsp; pp(tree(X, _, _), 0) :- write(X),write(&quot;\n&quot;).<br />&nbsp; &nbsp; pp(tree(_, Y, Z), N) :- N1 = N+1, prob(N),print(Y),prob(N),print(Z),pp(Y, N1),pp(Z, N1).<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />goal<br />&nbsp; &nbsp; pp(tree(&quot;Anna(0)&quot;, <br />&nbsp; &nbsp; &nbsp; &nbsp; tree(&quot;Victor(1)&quot;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tree(&quot;Alexandr(2)&quot;, empty, empty), <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tree(&quot;Joneya(2)&quot;, empty, empty)),<br />&nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; tree(&quot;Luda(1)&quot;, <br />&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tree(&quot;Vic(2)&quot;, empty, empty), <br />&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tree(&quot;vicki(2)&quot;, empty, empty))), <br />&nbsp; &nbsp;&nbsp; 0), nl, fail; true.</p>]]></description>
			<author><![CDATA[null@example.com (admin)]]></author>
			<pubDate>Fri, 21 Dec 2012 14:52:17 +0000</pubDate>
			<guid>https://itpmr.ru/viewtopic.php?pid=123752#p123752</guid>
		</item>
		<item>
			<title><![CDATA[Re: Примеры программ на PROLOG]]></title>
			<link>https://itpmr.ru/viewtopic.php?pid=123751#p123751</link>
			<description><![CDATA[<p>domains <br />&nbsp; &nbsp; treetype = tree(string, treetype, treetype); empty()<br />&nbsp; &nbsp; <br />predicates<br />&nbsp; &nbsp; pp(treetype, integer)<br />&nbsp; &nbsp; po(treetype)</p><p>clauses&nbsp; &nbsp; </p><p>&nbsp; &nbsp; po(empty).<br />&nbsp; &nbsp; po(tree(X, _, _)) :- write(X), nl, !.<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; pp(empty, _).<br />&nbsp; &nbsp; pp(tree(X, _, _), 0) :- write(X).<br />&nbsp; &nbsp; pp(tree(_, Y, Z), N) :- N1 = N+1, po(Y), po(Z), pp(Y, N1), pp(Z, N1).<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />goal<br />&nbsp; &nbsp; pp(tree(&quot;Katia&quot;, <br />&nbsp; &nbsp; &nbsp; &nbsp; tree(&quot;Misha&quot;, <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tree(&quot;Vova&quot;, empty, empty), <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tree(&quot;Lida&quot;, empty, empty)),<br />&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; tree(&quot;Liuda&quot;, <br />&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tree(&quot;Zina&quot;, empty, empty), <br />&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tree(&quot;Petia&quot;, empty, empty))), <br />&nbsp; &nbsp;&nbsp; 0), nl, fail; true.</p>]]></description>
			<author><![CDATA[null@example.com (admin)]]></author>
			<pubDate>Fri, 21 Dec 2012 14:52:09 +0000</pubDate>
			<guid>https://itpmr.ru/viewtopic.php?pid=123751#p123751</guid>
		</item>
		<item>
			<title><![CDATA[Re: Примеры программ на PROLOG]]></title>
			<link>https://itpmr.ru/viewtopic.php?pid=123750#p123750</link>
			<description><![CDATA[<p>domains<br />&nbsp; &nbsp;&nbsp; treetype = tree (string, treetype, treetype); empty ()</p><p>&nbsp; &nbsp; predicates<br />&nbsp; &nbsp;&nbsp; max(integer, integer, integer)<br />&nbsp; &nbsp;&nbsp; print_all_elements (treetype, integer, integer)<br />&nbsp; &nbsp;&nbsp; <br />&nbsp; &nbsp; clauses<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; max(X, Y, X) :- X&gt;Y, !.<br />&nbsp; &nbsp; max(X, Y, Y) :- Y&gt;X, !.<br />&nbsp; &nbsp; <br />&nbsp; &nbsp;&nbsp; print_all_elements (empty, N, MAX):- max(N, MAX, M), M&gt;MAX, write(M), nl, !.</p><p>&nbsp; &nbsp;&nbsp; print_all_elements (tree (X, Y, Z), N, M):-<br />&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; write (X), nl, N1 = N + 1,<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; print_all_elements (Y, N1, M),<br />&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; print_all_elements (Z, N1, M).</p><p>goal<br />&nbsp; &nbsp; &nbsp; &nbsp; print_all_elements&nbsp; (tree (&quot;Катя&quot;,&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tree (&quot;Миша&quot;,&nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tree (&quot;Вова&quot;, empty, empty),&nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tree (&quot;Лида&quot;, <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tree (&quot;Маша&quot;, empty, empty), <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tree (&quot;Дуся&quot;, <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tree (&quot;Ира&quot;, empty, empty), <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tree (&quot;Вася&quot;, empty, empty)))), <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tree (&quot;Люда&quot;, <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tree (&quot;Зина&quot;, empty, empty), <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tree (&quot;Петя&quot;, empty, empty))), 0, 0).</p>]]></description>
			<author><![CDATA[null@example.com (admin)]]></author>
			<pubDate>Fri, 21 Dec 2012 14:52:03 +0000</pubDate>
			<guid>https://itpmr.ru/viewtopic.php?pid=123750#p123750</guid>
		</item>
		<item>
			<title><![CDATA[Re: Примеры программ на PROLOG]]></title>
			<link>https://itpmr.ru/viewtopic.php?pid=123749#p123749</link>
			<description><![CDATA[]]></description>
			<author><![CDATA[null@example.com (admin)]]></author>
			<pubDate>Fri, 21 Dec 2012 14:51:39 +0000</pubDate>
			<guid>https://itpmr.ru/viewtopic.php?pid=123749#p123749</guid>
		</item>
		<item>
			<title><![CDATA[Re: Примеры программ на PROLOG]]></title>
			<link>https://itpmr.ru/viewtopic.php?pid=123748#p123748</link>
			<description><![CDATA[<p>predicates<br />&nbsp; &nbsp; f(real, real)<br />&nbsp; &nbsp; <br />clauses<br />&nbsp; &nbsp; f(1, 0.5) :- !.<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; f(X, FX) :-<br />&nbsp; &nbsp; &nbsp; &nbsp; Y = X-1,<br />&nbsp; &nbsp; &nbsp; &nbsp; f(Y, FY),<br />&nbsp; &nbsp; &nbsp; &nbsp; FX = (1-(1/(X*2)))*FY.</p><p>goal<br />&nbsp; &nbsp; X=10, f(X, FX).</p>]]></description>
			<author><![CDATA[null@example.com (admin)]]></author>
			<pubDate>Fri, 21 Dec 2012 14:49:38 +0000</pubDate>
			<guid>https://itpmr.ru/viewtopic.php?pid=123748#p123748</guid>
		</item>
	</channel>
</rss>
