chunk_id
large_stringlengths
9
11
question_id
large_stringlengths
6
8
language
large_stringclasses
1 value
chunk_index
int64
0
4
chunk_text
large_stringlengths
115
2.62k
sparse_text
large_stringlengths
111
4.37k
dense_vector
listlengths
3.58k
3.58k
sparse_indices
listlengths
9
217
sparse_values
listlengths
9
217
export_source
large_stringclasses
1 value
14545720_c1
14545720
prolog
1
,Q, P) :- delete( Y, Q, Cond), % predecessor( X, Y), !, % Y is a descendant of X prob( X, Cond, Px), prob( Y, [X | Cond], PyGivenX), prob( Y, Cond, Py), P is Px * PyGivenX / Py, % Assuming Py > 0 p(hanging_dead_body, 0.1). p(offensive_injuries,0.05). p(head_injuries, 0.5). p(markings,0.2). p('state of mind',0.1). p(tra...
,Q, P) :- delete( Y, Q, Cond), % predecessor( X, Y), !, % Y is a descendant of X prob( X, Cond, Px), prob( Y, [X | Cond], PyGivenX), prob( Y, Cond, Py), P is Px * PyGivenX / Py, % Assuming Py > 0 p(hanging_dead_body, 0.1). p(offensive_injuries,0.05). p(head_injuries, 0.5). p(markings,0.2). p('state of mind',0.1). p(tra...
[ 0.0037384033203125, 0.01373291015625, 0.00384521484375, 0.0174560546875, -0.0159912109375, 0.0189208984375, 0.01025390625, -0.0164794921875, 0.00482177734375, -0.04248046875, 0.0108642578125, -0.0029754638671875, -0.006744384765625, -0.03466796875, 0.01092529296875, 0.01544189453125, ...
[ 4, 2737, 436, 15772, 154109, 990, 2396, 1657, 71, 1745, 1653, 13, 26531, 748, 1193, 711, 83, 10, 60887, 1236, 43011, 425, 27512, 37735, 1353, 1542, 248, 66596, 977, 757, 915, 8467, 214, 112, 712, 37873, 107754, 170325, 461, 99929, 31251...
[ 0.011566162109375, 0.15771484375, 0.15966796875, 0.045196533203125, 0.276123046875, 0.1304931640625, 0.162841796875, 0.144775390625, 0.11279296875, 0.0716552734375, 0.087646484375, 0.06707763671875, 0.130615234375, 0.0975341796875, 0.04266357421875, 0.043609619140625, 0.0354614257812...
embed
15065663_c0
15065663
prolog
0
Title: Exclamation mark in Prolog Problem title: Exclamation mark in Prolog Tags: prolog Problem: Exclamation mark in Prolog Given the following facts and predicates: sound(time1). sound(time2). sun(time3). relax(X):-sound(X),!,sun(X). relax(_):-sun(_). When executing relax(S). I'd expect to get S=time1 due to the ! , ...
Exclamation mark in Prolog Exclamation mark in Prolog prolog Exclamation Prolog time1 time2 time3 Call _G1831 Exit Fail Exclamation mark in Prolog Given the following facts and predicates: When executing relax(S). I'd expect to get S=time1 due to the ! , that says (correct me if I'm wrong), that if 'X' is satisfied , t...
[ 0.0194091796875, 0.00238037109375, 0.022705078125, 0.0252685546875, -0.006103515625, 0.007080078125, 0.0023193359375, -0.0030364990234375, 0.01483154296875, -0.0185546875, 0.0206298828125, 0.0203857421875, -0.01513671875, -0.0235595703125, 0.01416015625, 0.0128173828125, 0.0307617187...
[ 110823, 4580, 1363, 16188, 1250, 4867, 23, 502, 1733, 418, 304, 363, 26265, 1819, 5016, 5443, 217, 190355, 15824, 71924, 20648, 294, 71, 41206, 2046, 159, 1369, 6032, 4743, 70, 711, 17378, 32399, 163, 2174, 44691, 1542, 214521, 7279, 4420...
[ 0.0841064453125, 0.2078857421875, 0.034515380859375, 0.186279296875, 0.1715087890625, 0.265869140625, 0.0156097412109375, 0.120361328125, 0.130126953125, 0.06695556640625, 0.0628662109375, 0.10467529296875, 0.134765625, 0.0369873046875, 0.1673583984375, 0.120849609375, 0.064270019531...
embed
57316504_c1
57316504
prolog
1
+1, ( F4 =:= 3, R4 =:= 5 ; F5 =:= 3, R5 =:= 5 ; F6 =:= 3, R6 =:= 5 ). assign(_,[]). assign(Digs,[D|Vars]):- del(D,Digs,Digs1), assign(Digs1,Vars). del(X,L,L1) :- remove(X,L,L1). remove([],X,[]) :- !. remove([X|T],X,L1) :- !, remove(T,X,L1). remove([H|T],X,[H|L1]) :- remove(T,X,L1). I don't understand which query to use...
+1, ( F4 =:= 3, R4 =:= 5 ; F5 =:= 3, R5 =:= 5 ; F6 =:= 3, R6 =:= 5 ). assign(_,[]). assign(Digs,[D|Vars]):- del(D,Digs,Digs1), assign(Digs1,Vars). del(X,L,L1) :- remove(X,L,L1). remove([],X,[]) :- !. remove([X|T],X,L1) :- !, remove(T,X,L1). remove([H|T],X,[H|L1]) :- remove(T,X,L1). I don't understand which query to use...
[ -0.017333984375, 0.0233154296875, -0.0118408203125, 0.006072998046875, -0.023193359375, -0.00110626220703125, -0.03369140625, 0.019775390625, 0.011474609375, -0.01373291015625, 0.0238037109375, -0.0028839111328125, 0.01312255859375, -0.00823974609375, -0.0108642578125, 0.00169372558593...
[ 57157, 563, 617, 138, 627, 190, 758, 910, 95486, 397, 872, 81827, 146, 17727, 418, 1542, 87388, 618, 2301, 18, 28219, 3129, 41, 1294, 4527, 678, 903, 25632, 29806, 9790, 7311, 1305, 86869, 15586, 146049, 919, 1052, 76172, 157, 1366, 304...
[ 0.2054443359375, 0.091796875, 0.1334228515625, 0.1016845703125, 0.07659912109375, 0.085205078125, 0.0916748046875, 0.1116943359375, 0.16064453125, 0.037322998046875, 0.1484375, 0.1190185546875, 0.134765625, 0.03717041015625, 0.05645751953125, 0.0098876953125, 0.1298828125, 0.000701...
embed
33747361_c0
33747361
prolog
0
Title: Prolog: Is f(X) = X unifiable or not? Problem title: Prolog: Is f(X) = X unifiable or not? Tags: prolog, unification Problem: Prolog: Is f(X) = X unifiable or not? My understanding of unification is a little patchy. I understand basic unification, but I'm having issues getting my head round terms which are not u...
Prolog: Is f(X) = X unifiable or not? Prolog: Is f(X) = X unifiable or not? prolog unification Prolog Prolog: Is f(X) = X unifiable or not? My understanding of unification is a little patchy. I understand basic unification, but I'm having issues getting my head round terms which are not unifiable. I was watching a yout...
[ 0.0235595703125, 0.006591796875, 0.0169677734375, -0.01043701171875, -0.01043701171875, -0.00799560546875, 0.01068115234375, -0.014892578125, -0.0106201171875, 0.0034027099609375, -0.003570556640625, -0.00115966796875, 0.002532958984375, -0.00201416015625, 0.00885009765625, 0.013427734...
[ 1250, 4867, 1238, 132, 1542, 2203, 1193, 51, 27430, 2886, 959, 502, 41274, 2071, 100094, 10176, 110912, 28219, 10336, 68807, 69407, 100244, 32772, 57143, 77336, 31577, 47314, 26548, 13579, 70541, 10644, 705, 30646, 420, 167089, 157, 7108, 403...
[ 0.127197265625, 0.19384765625, 0.167236328125, 0.0404052734375, 0.1640625, 0.114013671875, 0.154052734375, 0.1339111328125, 0.1339111328125, 0.11181640625, 0.0751953125, 0.124755859375, 0.132568359375, 0.02569580078125, 0.04779052734375, 0.011993408203125, 0.006988525390625, 0.0527...
embed
37117387_c0
37117387
prolog
0
Title: Trying to obtain cost for a given path Problem title: Trying to obtain cost for a given path Tags: clpfd, prolog, prolog-dif, path Problem: Trying to obtain cost for a given path I am new to Prolog I am trying in Prolog a rule that gives me a given path from a node to another and also gives me the total weight o...
Trying to obtain cost for a given path Trying to obtain cost for a given path clpfd prolog prolog-dif path Trying Visited Trying to obtain cost for a given path I am new to Prolog I am trying in Prolog a rule that gives me a given path from a node to another and also gives me the total weight of the path. I have succee...
[ 0.0238037109375, 0.04052734375, -0.00238037109375, 0.01177978515625, -0.00103759765625, 0.017822265625, -0.0250244140625, -0.00494384765625, 0.005035400390625, -0.058837890625, 0.0087890625, -0.0086669921875, -0.023193359375, 0.00738525390625, -0.006500244140625, 0.019775390625, 0.01...
[ 40858, 113054, 11034, 100, 34475, 60875, 214, 39557, 71, 502, 4867, 428, 420, 98684, 1250, 31577, 79986, 1295, 110, 15700, 3622, 57888, 214493, 121303, 7639, 77336, 159, 15190, 1257, 28271, 4420, 8, 74635, 756, 80854, 6528, 436, 28864 ]
[ 0.087158203125, 0.10174560546875, 0.1937255859375, 0.03955078125, 0.06103515625, 0.180908203125, 0.010009765625, 0.021514892578125, 0.039764404296875, 0.06658935546875, 0.2025146484375, 0.031036376953125, 0.1065673828125, 0.0823974609375, 0.1053466796875, 0.0943603515625, 0.129150390...
embed
70279750_c0
70279750
prolog
0
Title: How to program with prolog using lists for reversing Problem title: How to program with prolog using lists for reversing Tags: prolog Problem: How to program with prolog using lists for reversing We want now to evaluate if any word in our language which is only made with the letters {a,b}, is a palindrome or not...
How to program with prolog using lists for reversing How to program with prolog using lists for reversing prolog lists How langage6 How to program with prolog using lists for reversing We want now to evaluate if any word in our language which is only made with the letters {a,b}, is a palindrome or not. I did code the p...
[ 0.00628662109375, 0.012939453125, 0.0054931640625, 0.02099609375, -0.01092529296875, 0.0361328125, 0.0169677734375, 0.0177001953125, 0.01263427734375, -0.0247802734375, 0.0291748046875, 0.00157928466796875, -0.0030975341796875, -0.01239013671875, 0.015869140625, -0.00145721435546875, ...
[ 11249, 1528, 678, 502, 4867, 17368, 5303, 100, 39531, 6953, 1937, 4588, 910, 3444, 5036, 47, 151575, 2174, 2565, 2446, 46876, 4734, 7228, 120820, 11, 4, 275, 83, 10, 17923, 19, 102851, 959, 18151, 35064, 26946, 707, 876, 3789, 107730, 9...
[ 0.053863525390625, 0.212890625, 0.079833984375, 0.1865234375, 0.25146484375, 0.05731201171875, 0.199951171875, 0.0168914794921875, 0.2227783203125, 0.17724609375, 0.1331787109375, 0.130126953125, 0.139892578125, 0.035675048828125, 0.00518798828125, 0.014862060546875, 0.12841796875, ...
embed
26955610_c0
26955610
prolog
0
Title: Not fixed arity for a functor (Prolog) Problem title: Not fixed arity for a functor (Prolog) Tags: prolog Problem: Not fixed arity for a functor (Prolog) In my Prolog program I have a predicate reg/1 which says if something is a regular expression. I'd like to make the program recognize sequences of regular expr...
Not fixed arity for a functor (Prolog) Not fixed arity for a functor (Prolog) prolog Not Prolog a_1 a_2 a_n Not fixed arity for a functor (Prolog) In my Prolog program I have a predicate reg/1 which says if something is a regular expression. I'd like to make the program recognize sequences of regular expressions as a r...
[ 0.0010223388671875, 0.0059814453125, 0.0128173828125, 0.00872802734375, 0.0106201171875, 0.00543212890625, -0.007720947265625, 0.01434326171875, 0.0074462890625, -0.0169677734375, 0.00567626953125, -0.01495361328125, -0.00007724761962890625, -0.000934600830078125, 0.00732421875, -0.007...
[ 11205, 188347, 187, 2481, 100, 7477, 18770, 10752, 4867, 502, 1250, 10, 115187, 304, 454, 1528, 1653, 2063, 6835, 11583, 2174, 83, 20324, 125195, 1884, 3249, 125296, 26513, 237, 11, 10461, 19, 621, 756, 35166, 72272, 64, 9774, 47, 41, 1...
[ 0.115234375, 0.2044677734375, 0.168212890625, 0.1610107421875, 0.03125, 0.14892578125, 0.141357421875, 0.1312255859375, 0.2412109375, 0.1248779296875, 0.1680908203125, 0.0399169921875, 0.103759765625, 0.07763671875, 0.02093505859375, 0.146728515625, 0.10211181640625, 0.118408203125...
embed
53711414_c0
53711414
prolog
0
Title: Comparing sub-lists of a list Problem title: Comparing sub-lists of a list Tags: prolog Problem: Comparing sub-lists of a list Hello I am new to Prolong in particular lists. I need to be able to compare the heads and tails of subsists against other subsists from the same list. For example I if given a list [[1, ...
Comparing sub-lists of a list Comparing sub-lists of a list prolog Comparing Connection COUNT Loop Comparing sub-lists of a list Hello I am new to Prolong in particular lists. I need to be able to compare the heads and tails of subsists against other subsists from the same list. For example I if given a list [[1, 2], [...
[ 0.00897216796875, 0.00933837890625, 0.0037841796875, 0.0167236328125, -0.016357421875, 0.00775146484375, -0.004852294921875, -0.000415802001953125, 0.0213623046875, -0.026123046875, 0.01251220703125, -0.00567626953125, 0.005706787109375, 0.0103759765625, -0.00238037109375, -0.018310546...
[ 113307, 214, 1614, 6562, 7, 111, 5303, 9, 502, 4867, 62448, 8244, 64163, 199694, 35378, 3525, 1250, 10617, 17311, 3871, 19048, 47, 69101, 10336, 136, 308, 7870, 57702, 26548, 3789, 1295, 5701, 34475, 418, 116, 155761, 76172, 135812, 2174, ...
[ 0.2276611328125, 0.078857421875, 0.2376708984375, 0.2462158203125, 0.058258056640625, 0.0323486328125, 0.2127685546875, 0.00897216796875, 0.14208984375, 0.1956787109375, 0.138916015625, 0.0318603515625, 0.10064697265625, 0.18798828125, 0.044677734375, 0.033203125, 0.14599609375, 0....
embed
71962456_c0
71962456
prolog
0
Title: Combinations in all orders Problem title: Combinations in all orders Tags: prolog, combinations Problem: Combinations in all orders I want to generate all pairs of all the numbers of a range 1..N in all orders i.e. [X,Y] and [Y,X] I found these here : http://kti.ms.mff.cuni.cz/~bartak/prolog/combinatorics.html c...
Combinations in all orders Combinations in all orders prolog combinations Combinations Comb N-1 comb_rep RComb Combinations in all orders I want to generate all pairs of all the numbers of a range 1..N in all orders i.e. [X,Y] and [Y,X] I found these here : http://kti.ms.mff.cuni.cz/~bartak/prolog/combinatorics.html Th...
[ -0.01611328125, 0.0196533203125, -0.0020751953125, -0.00142669677734375, 0.0169677734375, 0.0196533203125, -0.0208740234375, -0.006195068359375, 0.021240234375, -0.03662109375, -0.006561279296875, 0.0034027099609375, 0.0289306640625, 0.01104736328125, -0.0123291015625, 0.00106811523437...
[ 106935, 19, 21094, 23, 756, 12989, 502, 4867, 162515, 3288, 275, 541, 5759, 375, 33581, 627, 10770, 3444, 47, 139392, 80836, 111, 101935, 37457, 615, 839, 1542, 1723, 136, 14037, 6097, 3688, 13089, 4902, 93, 1865, 3454, 277, 19155, 3826, ...
[ 0.2344970703125, 0.1844482421875, 0.0738525390625, 0.0299835205078125, 0.134765625, 0.2237548828125, 0.1134033203125, 0.199462890625, 0.232177734375, 0.1187744140625, 0.1351318359375, 0.0447998046875, 0.1192626953125, 0.1044921875, 0.15185546875, 0.03265380859375, 0.14208984375, 0....
embed
6321147_c0
6321147
prolog
0
Title: Prolog-SWI: procedure which removes one occurence Problem title: Prolog-SWI: procedure which removes one occurence Tags: prolog Problem: Prolog-SWI: procedure which removes one occurence I have the next function from the book: % Signature: select (X,HasXs,OneLessXs)/3 % purpose: The list OneLessXs is the result ...
Prolog-SWI: procedure which removes one occurence Prolog-SWI: procedure which removes one occurence prolog the Prolog-SWI Signature HasXs OneLessXs Prolog-SWI: procedure which removes one occurence I have the next function from the book: But I didn't understand how it finds the correct answer. After it removes all the ...
[ 0.00494384765625, 0.0301513671875, 0.0106201171875, 0.026123046875, -0.0206298828125, -0.01263427734375, -0.013916015625, 0.0201416015625, 0.023681640625, -0.0157470703125, 0.0023956298828125, 0.009033203125, -0.01202392578125, -0.006317138671875, 0.0067138671875, 0.00860595703125, 0...
[ 1250, 4867, 9, 294, 38969, 50491, 3129, 87388, 7, 1632, 74918, 6620, 502, 26729, 141762, 20625, 1542, 6561, 68016, 11737, 32354, 1295, 70, 12877, 18, 28219, 7413, 26785, 35166, 24372, 756, 990, 1369, 38, 1380, 79986, 14012, 106, 678, 1193...
[ 0.1575927734375, 0.21630859375, 0.0238037109375, 0.08929443359375, 0.2332763671875, 0.2197265625, 0.036376953125, 0.2081298828125, 0.135009765625, 0.142578125, 0.2056884765625, 0.09283447265625, 0.1322021484375, 0.1171875, 0.14208984375, 0.1595458984375, 0.1378173828125, 0.13769531...
embed
65242927_c0
65242927
prolog
0
Title: Truly Tail-Recursive modInverse() in Prolog Problem title: Truly Tail-Recursive modInverse() in Prolog Tags: numbers, prolog Problem: Truly Tail-Recursive modInverse() in Prolog Rosetta code delivers me the following code snippet for modinv/3. It does calculate extended GCD via egcd/4 and then derives from it mo...
Truly Tail-Recursive modInverse() in Prolog Truly Tail-Recursive modInverse() in Prolog numbers prolog Truly Tail-Recursive Prolog Truly Tail-Recursive modInverse() in Prolog Rosetta code delivers me the following code snippet for modinv/3. It does calculate extended GCD via egcd/4 and then derives from it modinv/3: Ex...
[ 0.0023040771484375, 0.0194091796875, 0.021728515625, 0.0028533935546875, -0.0048828125, 0.00885009765625, -0.002227783203125, -0.0054931640625, -0.00115966796875, -0.033935546875, 0.01007080078125, -0.009765625, -0.005584716796875, 0.007659912109375, 0.0208740234375, 0.0130615234375, ...
[ 19419, 538, 1218, 379, 4332, 48650, 5844, 2811, 4153, 37676, 132, 1250, 4867, 101935, 502, 24009, 2310, 18151, 75060, 73, 334, 18113, 74481, 65042, 527, 16069, 1829, 30046, 71574, 17357, 89536, 41, 20016, 2967, 29806, 959, 46741, 195625, 16...
[ 0.114990234375, 0.0911865234375, 0.1751708984375, 0.17138671875, 0.043426513671875, 0.181884765625, 0.1131591796875, 0.180908203125, 0.07568359375, 0.25, 0.0115966796875, 0.1451416015625, 0.22265625, 0.145751953125, 0.07061767578125, 0.09002685546875, 0.1708984375, 0.09844970703125...
embed
27275378_c0
27275378
prolog
0
Title: Predicate must be true of all elements in a list Problem title: Predicate must be true of all elements in a list Tags: prolog Problem: Predicate must be true of all elements in a list I have a set of facts: likes(john,mary). likes(mary,robert). likes(robert,kate). likes(alan,george). likes(alan,mary). likes(geor...
Predicate must be true of all elements in a list Predicate must be true of all elements in a list prolog Predicate Predicate must be true of all elements in a list I have a set of facts: Now I want to write a relation which will check for all element X of an input list if likes(X,A) is true. my relation should return t...
[ 0.00162506103515625, 0.00164794921875, -0.006439208984375, 0.015380859375, -0.004669189453125, 0.01708984375, 0.022705078125, 0.01263427734375, -0.00005316734313964844, -0.0284423828125, 0.01055908203125, 0.0135498046875, -0.00299072265625, -0.00075531005859375, 0.003753662109375, 0.01...
[ 7145, 2063, 67, 8110, 186, 29568, 111, 756, 80854, 23, 5303, 502, 4867, 10, 765, 5423, 15824, 7, 3444, 33022, 41911, 1221, 12765, 100, 12830, 1193, 107730, 2174, 1884, 1542, 284, 83, 5608, 30646, 24145, 759, 339, 9790, 70, 140992, 6044,...
[ 0.2119140625, 0.255615234375, 0.1209716796875, 0.150390625, 0.070068359375, 0.2763671875, 0.1796875, 0.189208984375, 0.2264404296875, 0.08209228515625, 0.229736328125, 0.1600341796875, 0.19482421875, 0.029388427734375, 0.0291290283203125, 0.045196533203125, 0.1224365234375, 0.00509...
embed
5444963_c0
5444963
prolog
0
Title: Prolog: How do I check whether item exists in the database before adding? Problem title: Prolog: How do I check whether item exists in the database before adding? Tags: prolog Problem: Prolog: How do I check whether item exists in the database before adding? I start out with a blank database. I need to add some ...
Prolog: How do I check whether item exists in the database before adding? Prolog: How do I check whether item exists in the database before adding? prolog Prolog How John Veronica Jessica add_person Prolog: How do I check whether item exists in the database before adding? I start out with a blank database. I need to ad...
[ 0.002044677734375, 0.02392578125, 0.010009765625, 0.0142822265625, -0.01190185546875, 0.014892578125, -0.004364013671875, 0.0045166015625, 0.01214599609375, -0.06689453125, 0.0291748046875, 0.00482177734375, 0.006927490234375, 0.01470947265625, 0.013916015625, -0.00494384765625, 0.02...
[ 1250, 4867, 11249, 54, 87, 12765, 36766, 35735, 32316, 7, 23, 63399, 8108, 154107, 502, 4939, 197043, 90480, 15190, 30816, 4034, 44237, 112820, 814, 3444, 5701, 3445, 186351, 3871, 31577, 2967, 53418, 41, 1294, 678, 98385, 49100, 2174, 724,...
[ 0.1195068359375, 0.1766357421875, 0.08905029296875, 0.06048583984375, 0.022735595703125, 0.230224609375, 0.1826171875, 0.2100830078125, 0.2457275390625, 0.1492919921875, 0.097900390625, 0.2174072265625, 0.1578369140625, 0.17919921875, 0.08648681640625, 0.1522216796875, 0.224487304687...
embed
33668753_c0
33668753
prolog
0
Title: Prolog combinations with constraints Problem title: Prolog combinations with constraints Tags: prolog, combinations Problem: Prolog combinations with constraints I am looking for a way to find all possible solutions given a certain set of constraints. I had prolog in school but it has been a while so consider me...
Prolog combinations with constraints Prolog combinations with constraints prolog combinations Prolog Prolog combinations with constraints I am looking for a way to find all possible solutions given a certain set of constraints. I had prolog in school but it has been a while so consider me fairly new. What I want to ach...
[ -0.00183868408203125, 0.01422119140625, -0.00011682510375976562, 0.002288818359375, 0.00022983551025390625, 0.0115966796875, -0.0194091796875, 0.00180816650390625, -0.00168609619140625, -0.032958984375, -0.01275634765625, -0.0205078125, 0.007659912109375, 0.00445556640625, -0.00029945373...
[ 1250, 4867, 162515, 678, 158, 2816, 4288, 502, 16487, 3917, 7413, 756, 7722, 51347, 34475, 5423, 10696, 12960, 3525, 3444, 69307, 345, 310, 1193, 990, 136, 567, 351, 40907, 101935, 4734, 765, 116, 91736, 9969, 6743, 2856, 17721, 20, 758, ...
[ 0.1834716796875, 0.2587890625, 0.2462158203125, 0.10888671875, 0.1337890625, 0.2247314453125, 0.191162109375, 0.1446533203125, 0.023468017578125, 0.001708984375, 0.0675048828125, 0.0262603759765625, 0.111328125, 0.1639404296875, 0.03436279296875, 0.05224609375, 0.117919921875, 0.02...
embed
42656142_c0
42656142
prolog
0
Title: Prolog, family-tree how to say they are bastards Problem title: Prolog, family-tree how to say they are bastards Tags: prolog, family-tree Problem: Prolog, family-tree how to say they are bastards For example if I have this ancestors, how can I say who is the bastard son or daughter? ancestor(frank,mary). ancest...
Prolog, family-tree how to say they are bastards Prolog, family-tree how to say they are bastards prolog family-tree Prolog Prolog, family-tree how to say they are bastards For example if I have this ancestors, how can I say who is the bastard son or daughter? laws (there are some more code that I am not posting becaus...
[ 0.028076171875, 0.0034027099609375, -0.005279541015625, 0.0010986328125, -0.001708984375, 0.0262451171875, -0.0120849609375, 0.00262451171875, -0.01025390625, -0.020263671875, -0.00439453125, -0.037109375, -0.017578125, 0.01708984375, 0.006103515625, 0.0035552978515625, 0.00958251953...
[ 1250, 4867, 14449, 62600, 3642, 47, 5154, 1836, 621, 26462, 4216, 7, 502, 765, 903, 60502, 22230, 2750, 83, 70, 775, 707, 76849, 131703, 18151 ]
[ 0.124267578125, 0.2205810546875, 0.095458984375, 0.2041015625, 0.031494140625, 0.021209716796875, 0.1651611328125, 0.16552734375, 0.14990234375, 0.1826171875, 0.2440185546875, 0.09649658203125, 0.089599609375, 0.033599853515625, 0.04302978515625, 0.1156005859375, 0.07830810546875, ...
embed
42819462_c0
42819462
prolog
0
Title: Is it correct to use 'if' in Prolog this way? Problem title: Is it correct to use 'if' in Prolog this way? Tags: prolog, if-statement, conditional-statements Problem: Is it correct to use 'if' in Prolog this way? Recently I started to learn logic programming and using Prolog, and a few days a...
Is it correct to use 'if' in Prolog this way? Is it correct to use 'if' in Prolog this way? prolog if-statement conditional-statements Prolog process_args1 process_args2 Is it correct to use 'if' in Prolog this way? Recently I started to learn logic programming and using Prolog, and a few days ago I...
[ 0.0216064453125, 0.00482177734375, 0.0072021484375, 0.015869140625, -0.0091552734375, 0.003997802734375, 0.013671875, 0.0067138671875, 0.0006103515625, -0.0361328125, 0.00078582763671875, -0.000732421875, -0.01348876953125, 0.00518798828125, 0.00860595703125, 0.0240478515625, -0.0128...
[ 2071, 26785, 4527, 3768, 3190, 23, 1250, 4867, 903, 3917, 502, 2174, 61340, 674, 35431, 289, 9433, 61477, 304, 62775, 56037, 63805, 831, 11814, 1653, 2063, 8110, 35839, 15044, 50218, 33022, 18151, 64457, 159029, 2685, 2499, 60212, 4263, 722...
[ 0.031036376953125, 0.212158203125, 0.1490478515625, 0.1552734375, 0.2744140625, 0.065673828125, 0.18896484375, 0.26025390625, 0.0968017578125, 0.1207275390625, 0.11767578125, 0.18701171875, 0.1610107421875, 0.00396728515625, 0.208251953125, 0.11376953125, 0.0855712890625, 0.0798339...
embed
8046108_c0
8046108
prolog
0
Title: Is it possible to reverse a list with only two arguments? Problem title: Is it possible to reverse a list with only two arguments? Tags: list, prolog Problem: Is it possible to reverse a list with only two arguments? Is it possible to reverse a list in Prolog with only two arguments? Such as: reverse_list(List, ...
Is it possible to reverse a list with only two arguments? Is it possible to reverse a list with only two arguments? list prolog reverse_list List Reversed Accumulator Head Tail Solution Is it possible to reverse a list with only two arguments? Is it possible to reverse a list in Prolog with only two arguments? Such as:...
[ -0.0007171630859375, 0.043212890625, 0.001739501953125, 0.0235595703125, -0.007080078125, 0.02880859375, -0.01007080078125, 0.0146484375, 0.0184326171875, -0.01300048828125, 0.027099609375, -0.00146484375, -0.00836181640625, 0.0177001953125, 0.009033203125, 0.0201416015625, 0.0291748...
[ 2071, 7722, 39531, 184, 5303, 678, 4734, 6626, 10750, 7, 502, 4867, 6562, 32036, 853, 7864, 29899, 316, 129073, 44816, 1218, 379, 187895, 1250, 18244, 132556, 27958, 83658, 58417, 17262, 5809, 4527, 183278, 1290, 123309, 56037, 29806, 114689,...
[ 0.00091552734375, 0.16015625, 0.2371826171875, 0.1905517578125, 0.211669921875, 0.0288848876953125, 0.07489013671875, 0.185791015625, 0.2421875, 0.015777587890625, 0.10638427734375, 0.228271484375, 0.184814453125, 0.169677734375, 0.039276123046875, 0.1903076171875, 0.041229248046875,...
embed
4211183_c0
4211183
prolog
0
Title: Prolog, recursive functions, and returning value by argument of a function Problem title: Prolog, recursive functions, and returning value by argument of a function Tags: return-value, prolog Problem: Prolog, recursive functions, and returning value by argument of a function Question is simply... why this doesn'...
Prolog, recursive functions, and returning value by argument of a function Prolog, recursive functions, and returning value by argument of a function return-value prolog Prolog Result HEAD TAIL Prolog, recursive functions, and returning value by argument of a function Question is simply... why this doesn't work? ?- rep...
[ 0.0002269744873046875, 0.0186767578125, 0.007049560546875, -0.00146484375, -0.00494384765625, 0.00665283203125, -0.0208740234375, 0.0021209716796875, 0.019775390625, -0.008056640625, 0.026123046875, -0.00750732421875, -0.01806640625, -0.00004601478576660156, 0.0211181640625, -0.0136718...
[ 1250, 4867, 195625, 5844, 32354, 30646, 34292, 390, 10750, 136, 214, 27494, 502, 126684, 188328, 12998, 16444, 111, 68185, 42856, 15400, 903, 22027, 18, 4488, 91995, 132, 141, 42, 4, 1542, 1193, 420, 1238, 1690, 1284, 76199, 98320, 959, 2...
[ 0.1964111328125, 0.28466796875, 0.237060546875, 0.1141357421875, 0.1990966796875, 0.234619140625, 0.212158203125, 0.1259765625, 0.242431640625, 0.02471923828125, 0.048248291015625, 0.1805419921875, 0.177001953125, 0.150390625, 0.064697265625, 0.0906982421875, 0.08251953125, 0.01098...
embed
18648926_c0
18648926
prolog
0
Title: inputting strings in prolog Problem title: inputting strings in prolog Tags: string, prolog Problem: inputting strings in prolog I'm fairly new to prolog and was gven code to modify for homework. However i am stuck with inputting stings. I am aware that strings inputted in prolgo are lists of ascii codes. ie, "a...
inputting strings in prolog inputting strings in prolog string prolog inputting strings in prolog I'm fairly new to prolog and was gven code to modify for homework. However i am stuck with inputting stings. I am aware that strings inputted in prolgo are lists of ascii codes. ie, "abc" = [97, 98, 99] This is the given c...
[ 0.0028228759765625, 0.0022735595703125, -0.0133056640625, 0.044677734375, -0.01116943359375, 0.01953125, -0.00244140625, -0.006744384765625, -0.0103759765625, -0.0208740234375, 0.0181884765625, -0.01275634765625, -0.017333984375, 0.01275634765625, -0.006866455078125, -0.002578735351562...
[ 107730, 1916, 79315, 7, 23, 502, 4867, 180663, 3525, 706, 1353, 18151, 2811, 40383, 5368, 18244, 179933, 103401, 107419, 3674, 113200, 519, 621, 5303, 237, 26506, 13, 2055, 238, 2203, 378, 14773, 16193, 10078, 3293, 83, 34475, 351, 112, 3...
[ 0.2103271484375, 0.06915283203125, 0.264892578125, 0.1287841796875, 0.09002685546875, 0.1817626953125, 0.252685546875, 0.0413818359375, 0.042755126953125, 0.006866455078125, 0.17236328125, 0.17431640625, 0.0679931640625, 0.005645751953125, 0.06182861328125, 0.07989501953125, 0.091796...
embed
53405266_c0
53405266
prolog
0
Title: What is never equal to itself? Problem title: What is never equal to itself? Tags: prolog-dif, prolog Problem: What is never equal to itself? Is there value in Prolog that is not equal to itself? I write answer to some question about min of tree and this answer also says that if tree is empty min is null. Sounds...
What is never equal to itself? What is never equal to itself? prolog-dif prolog What Something What is never equal to itself? Is there value in Prolog that is not equal to itself? I write answer to some question about min of tree and this answer also says that if tree is empty min is null. Sounds good idea first but no...
[ 0.023193359375, 0.006072998046875, 0.00799560546875, 0.0113525390625, -0.01055908203125, 0.0106201171875, 0.02392578125, -0.003570556640625, 0.010498046875, -0.005340576171875, -0.01068115234375, 0.0115966796875, -0.006927490234375, 0.017822265625, 0.01708984375, -0.002044677734375, ...
[ 4865, 8306, 105950, 47, 68034, 83, 502, 4867, 420, 200905, 34292, 23, 1250, 959, 881, 53201, 201505, 56574, 42413, 6528, 34627, 13579, 11343, 2174, 13580, 98320, 5351, 29568, 132283 ]
[ 0.06939697265625, 0.1868896484375, 0.1983642578125, 0.118896484375, 0.1707763671875, 0.108154296875, 0.0860595703125, 0.2061767578125, 0.03009033203125, 0.1561279296875, 0.1595458984375, 0.003631591796875, 0.11572265625, 0.1016845703125, 0.18896484375, 0.1734619140625, 0.152954101562...
embed
71919692_c0
71919692
prolog
0
Title: How to implement the theory of copy movement in Prolog? Problem title: How to implement the theory of copy movement in Prolog? Tags: prolog, linguistics Problem: How to implement the theory of copy movement in Prolog? Using this input: parse(Parse, [what,did,thomas,eat], []) I want to produce this output: sbarq(...
How to implement the theory of copy movement in Prolog? How to implement the theory of copy movement in Prolog? prolog linguistics How Prolog Parse Tree WHNP VBD NNP How to implement the theory of copy movement in Prolog? Using this input: parse(Parse, [what,did,thomas,eat], []) I want to produce this output: with this...
[ 0.0027618408203125, 0.02978515625, -0.019775390625, 0.037109375, -0.005950927734375, 0.0267333984375, 0.0036773681640625, 0.006317138671875, 0.037353515625, -0.03369140625, 0.00167083740234375, 0.0101318359375, -0.024658203125, -0.01123046875, 0.0016632080078125, 0.007415771484375, -...
[ 11249, 47, 29479, 154453, 111, 43658, 112664, 23, 1250, 4867, 502, 147158, 2392, 184, 101344, 601, 841, 28814, 310, 48969, 903, 107730, 366, 28636, 124409, 32141, 157978, 162, 13, 257, 27489, 140992, 18151, 3642, 15549, 148, 127, 83018, 393...
[ 0.061309814453125, 0.0282440185546875, 0.175537109375, 0.178466796875, 0.0443115234375, 0.2158203125, 0.1793212890625, 0.055328369140625, 0.142578125, 0.2470703125, 0.051513671875, 0.093994140625, 0.137939453125, 0.1484375, 0.2137451171875, 0.044189453125, 0.09130859375, 0.16772460...
embed
24320534_c0
24320534
prolog
0
Title: Searching for a value in a list with Prolog Problem title: Searching for a value in a list with Prolog Tags: member, prolog, list, recursion Problem: Searching for a value in a list with Prolog I'm writing a recursive function in Prolog to check if a course (Crs) in a semester (SEM, a list) has its pre requisite...
Searching for a value in a list with Prolog Searching for a value in a list with Prolog member prolog list recursion Searching Prolog Prior SEM Crs Tail List comp3506 lvl3 csse2002 csse1001 lvl1 Searching for a value in a list with Prolog I'm writing a recursive function in Prolog to check if a course (Crs) in a semest...
[ -0.01104736328125, 0.02392578125, 0.01348876953125, 0.0166015625, -0.007080078125, 0.0023040771484375, -0.01214599609375, -0.006561279296875, 0.0029296875, -0.029052734375, 0.029052734375, 0.0296630859375, -0.00141143798828125, 0.01397705078125, 0.005859375, -0.01226806640625, 0.0115...
[ 33086, 100, 34292, 5303, 678, 1250, 4867, 23, 32786, 502, 195625, 135967, 48301, 41802, 1218, 379, 32036, 9969, 45160, 50132, 2619, 41632, 3559, 418, 32562, 5844, 32354, 12765, 2174, 15411, 4295, 49345, 150576, 479, 87103, 435, 116, 27781, ...
[ 0.18017578125, 0.1182861328125, 0.180419921875, 0.1912841796875, 0.018768310546875, 0.1678466796875, 0.24951171875, 0.04229736328125, 0.1190185546875, 0.0980224609375, 0.1956787109375, 0.2158203125, 0.125, 0.004913330078125, 0.0295867919921875, 0.0146942138671875, 0.096435546875, 0...
embed
72483171_c0
72483171
prolog
0
Title: Prolog - understanding recursive predicate returning list Problem title: Prolog - understanding recursive predicate returning list Tags: prolog, recursion Problem: Prolog - understanding recursive predicate returning list I am very new to Prolog and wondering if I could get some help in better understanding the ...
Prolog - understanding recursive predicate returning list Prolog - understanding recursive predicate returning list prolog recursion Prolog find_num Lout Lin check_list Tin Tout Prolog - understanding recursive predicate returning list I am very new to Prolog and wondering if I could get some help in better understandi...
[ -0.0135498046875, 0.005859375, 0.0078125, -0.01025390625, -0.007080078125, 0.0255126953125, -0.0177001953125, -0.005767822265625, 0.006195068359375, -0.0118408203125, 0.01373291015625, -0.02978515625, -0.004364013671875, -0.014404296875, 0.01007080078125, 0.01104736328125, 0.02514648...
[ 1250, 4867, 100094, 195625, 5844, 1653, 2063, 30646, 214, 5303, 67, 502, 7413, 2606, 42225, 18, 25497, 12765, 6562, 8081, 31051, 3525, 4358, 11522, 35064, 18151, 28219, 97368, 111607, 34844, 137565, 10336, 10932, 123087, 678, 78292, 77947 ]
[ 0.1614990234375, 0.2325439453125, 0.130126953125, 0.1802978515625, 0.105712890625, 0.1304931640625, 0.1807861328125, 0.171142578125, 0.0499267578125, 0.1588134765625, 0.03668212890625, 0.0858154296875, 0.1131591796875, 0.213623046875, 0.0992431640625, 0.06256103515625, 0.160522460937...
embed
33873201_c0
33873201
prolog
0
Title: How to execute a prolog query which I got from a http parameter in SWIProlog Problem title: How to execute a prolog query which I got from a http parameter in SWIProlog Tags: prolog, swi-prolog Problem: How to execute a prolog query which I got from a http parameter in SWIProlog I'm writing a webservice in SWI P...
How to execute a prolog query which I got from a http parameter in SWIProlog How to execute a prolog query which I got from a http parameter in SWIProlog prolog swi-prolog a How SWIProlog handle_query Request http_parameters Query Father Mother How to execute a prolog query which I got from a http parameter in SWIProlo...
[ -0.0047607421875, 0.02978515625, -0.004058837890625, 0.00191497802734375, -0.0096435546875, 0.006317138671875, 0.00008296966552734375, -0.008056640625, -0.0024261474609375, -0.0927734375, 0.014404296875, -0.0166015625, -0.0291748046875, 0.00168609619140625, -0.0003204345703125, -0.0017...
[ 11249, 71924, 13, 502, 4867, 41, 1294, 4163, 1295, 1621, 171859, 159, 38969, 10752, 91, 2452, 3454, 34831, 944, 75616, 6276, 29089, 58836, 160960, 115217, 32562, 1467, 22584, 1250, 79794, 4516, 30646, 16750, 821, 58627, 18151, 27781, 67373, ...
[ 0.0667724609375, 0.203857421875, 0.006500244140625, 0.184814453125, 0.255859375, 0.170654296875, 0.1358642578125, 0.1019287109375, 0.0635986328125, 0.1983642578125, 0.2247314453125, 0.0833740234375, 0.2388916015625, 0.17822265625, 0.0322265625, 0.21240234375, 0.1195068359375, 0.100...
embed
41248755_c0
41248755
prolog
0
Title: split statement in truthable Problem title: split statement in truthable Tags: prolog Problem: split statement in truthable So I made a Prolog program that takes any number of parameters such as A B C and a statement and prints its truth table. What if I want to split each statement alone and show its truth tabl...
split statement in truthable split statement in truthable prolog VarList Expr split statement in truthable So I made a Prolog program that takes any number of parameters such as A B C and a statement and prints its truth table. What if I want to split each statement alone and show its truth table as well? example and(o...
[ 0.007537841796875, -0.00823974609375, -0.01336669921875, 0.0194091796875, -0.042724609375, 0.02685546875, 0.022216796875, -0.00360107421875, -0.005645751953125, -0.007537841796875, -0.0118408203125, -0.00762939453125, -0.0145263671875, 0.0186767578125, 0.002960205078125, 0.026123046875...
[ 65450, 63805, 23, 85027, 2886, 502, 4867, 3323, 154663, 60075, 42, 1250, 1528, 51776, 171859, 335, 28412, 23180, 3444, 12638, 75447, 7639, 27781, 136, 748, 571, 2940, 156672, 55300, 91693, 3714, 4527, 18151 ]
[ 0.243896484375, 0.2227783203125, 0.0213470458984375, 0.185302734375, 0.200927734375, 0.1187744140625, 0.1900634765625, 0.1390380859375, 0.1483154296875, 0.060272216796875, 0.039093017578125, 0.1119384765625, 0.11962890625, 0.02166748046875, 0.132080078125, 0.013427734375, 0.094787597...
embed
5048912_c0
5048912
prolog
0
Title: Convert list into functor parameter Problem title: Convert list into functor parameter Tags: prolog Problem: Convert list into functor parameter I got stuck to implement a logic. At some instance in my program I have a list say named as List. The length of this List is variable and I don't know in advance. Now I...
Convert list into functor parameter Convert list into functor parameter prolog Convert Convert list into functor parameter I got stuck to implement a logic. At some instance in my program I have a list say named as List. The length of this List is variable and I don't know in advance. Now I have to pass this list in a ...
[ 0.0091552734375, 0.007720947265625, 0.009521484375, 0.00445556640625, -0.0057373046875, 0.0000896453857421875, -0.003448486328125, -0.006195068359375, 0.000225067138671875, -0.034912109375, 0.0029449462890625, -0.0242919921875, 0.01708984375, 0.0128173828125, -0.031494140625, -0.011291...
[ 1657, 11549, 5303, 3934, 7477, 18770, 171859, 502, 4867, 4163, 179933, 29479, 62775, 110527, 1528, 24, 4806, 237, 32036, 140909, 77336, 136, 2301, 18, 3714, 129745, 27875, 23, 28282, 15824, 51, 2886, 13448, 442, 15190, 191633, 95037, 31577, ...
[ 0.07403564453125, 0.191162109375, 0.28466796875, 0.1395263671875, 0.2420654296875, 0.242431640625, 0.29296875, 0.129638671875, 0.1854248046875, 0.0435791015625, 0.1353759765625, 0.18603515625, 0.2105712890625, 0.07177734375, 0.12255859375, 0.00732421875, 0.018463134765625, 0.042877...
embed
66058449_c1
66058449
prolog
1
book)-1/2], L = [[object, book, book, countable, na, eq, 1], [property, book, red, pos], [predicate, own, own, named('Peter'), book]], S = own(named('Peter'), book(red)) . of course my current code is quite specific ... but one thing which starts to unravel ... eerie feeling ... it looks like DCG code ... property -> ...
book)-1/2], L = [[object, book, book, countable, na, eq, 1], [property, book, red, pos], [predicate, own, own, named('Peter'), book]], S = own(named('Peter'), book(red)) . of course my current code is quite specific ... but one thing which starts to unravel ... eerie feeling ... it looks like DCG code ... property -> ...
[ 0.0081787109375, 0.000652313232421875, 0.01104736328125, 0.00188446044921875, -0.005645751953125, 0.007415771484375, 0.00872802734375, -0.00177001953125, 0.0038604736328125, -0.058349609375, 0.0089111328125, 0.01153564453125, 0.00823974609375, 0.0027313232421875, 0.00121307373046875, 0...
[ 12877, 16, 9, 118551, 268, 339, 2203, 187694, 54529, 2886, 24, 864, 106, 36290, 56, 4842, 3864, 19714, 2063, 10002, 128503, 159, 76, 2822, 759, 43581, 18151, 32233, 29458, 4034, 219, 2601, 28, 35890, 34698, 33342, 1884, 391, 56367, 57266,...
[ 0.25146484375, 0.0374755859375, 0.046051025390625, 0.244140625, 0.03839111328125, 0.13916015625, 0.102783203125, 0.1827392578125, 0.1395263671875, 0.1358642578125, 0.099853515625, 0.0657958984375, 0.02911376953125, 0.0633544921875, 0.08343505859375, 0.10137939453125, 0.097900390625, ...
embed
44557272_c0
44557272
prolog
0
Title: Stop condition for recursion in prolog Problem title: Stop condition for recursion in prolog Tags: prolog, transitive-closure, recursion Problem: Stop condition for recursion in prolog Here are the facts that I have in my knowledge base ( http://www.doc.gold.ac.uk/~mas02gw/prolog_tutorial/prologpages/recursion.h...
Stop condition for recursion in prolog Stop condition for recursion in prolog prolog transitive-closure recursion Stop Fatal Error LOCALSZ Stop condition for recursion in prolog Here are the facts that I have in my knowledge base ( http://www.doc.gold.ac.uk/~mas02gw/prolog_tutorial/prologpages/recursion.html (Recursion...
[ 0.003173828125, 0.0167236328125, 0.01324462890625, 0.023681640625, 0.01068115234375, 0.0052490234375, -0.032470703125, 0.00165557861328125, 0.00034332275390625, -0.038818359375, 0.0283203125, 0.00421142578125, 0.00274658203125, 0.0035552978515625, 0.04931640625, 0.004150390625, 0.017...
[ 42284, 35431, 195625, 1830, 502, 4867, 100, 23, 62621, 5844, 170224, 3036, 1803, 212059, 230588, 19934, 15824, 51359, 3647, 122558, 3454, 77275, 107, 48650, 4332, 155534, 3444, 4527, 47, 8, 106357, 9844, 162520, 837, 275, 83, 49518, 3501, 4...
[ 0.2232666015625, 0.251953125, 0.25390625, 0.1468505859375, 0.1622314453125, 0.255126953125, 0.0125732421875, 0.011749267578125, 0.1263427734375, 0.0289764404296875, 0.1763916015625, 0.08966064453125, 0.05047607421875, 0.138427734375, 0.164306640625, 0.168212890625, 0.04168701171875, ...
embed
50629502_c0
50629502
prolog
0
Title: How to count base clauses in another module in Prolog Problem title: How to count base clauses in another module in Prolog Tags: instantiation-error, prolog Problem: How to count base clauses in another module in Prolog In list.pl there is: :- module(list, [people/1, friend/2]). people([a, b, c, d, e]). friend(a...
How to count base clauses in another module in Prolog How to count base clauses in another module in Prolog instantiation-error prolog How Prolog aggregate_all Count Person ERROR Arguments How to count base clauses in another module in Prolog In list.pl there is: There may be another friend relations and people in list...
[ 0.019775390625, -0.0025787353515625, -0.0035247802734375, 0.0225830078125, 0.00799560546875, -0.0059814453125, 0.01611328125, -0.004058837890625, 0.0208740234375, -0.0498046875, -0.019287109375, -0.03173828125, 0.0152587890625, 0.02197265625, 0.0240478515625, -0.01263427734375, 0.007...
[ 47, 54529, 3647, 70731, 90, 15700, 88996, 1250, 4867, 23, 34648, 14, 188800, 502, 197564, 5584, 108210, 15270, 151206, 112140, 5303, 2424, 1543, 34391, 91582, 3395, 5700, 3444, 86869 ]
[ 0.0135498046875, 0.2052001953125, 0.208984375, 0.21728515625, 0.096435546875, 0.1025390625, 0.17333984375, 0.129150390625, 0.20654296875, 0.053680419921875, 0.0234222412109375, 0.0189056396484375, 0.1397705078125, 0.07867431640625, 0.1005859375, 0.05975341796875, 0.1700439453125, 0...
embed
61962191_c0
61962191
prolog
0
Title: How can I achieve more uniform backtracking in prolog? Problem title: How can I achieve more uniform backtracking in prolog? Tags: prolog Problem: How can I achieve more uniform backtracking in prolog? Assuming I have: makeTillDone(X) :- try(X). makeTillDone(X1) :- changeOne(X1, X2), makeTillDone(X2). makeTillDO...
How can I achieve more uniform backtracking in prolog? How can I achieve more uniform backtracking in prolog? prolog How ChangeOne ChangeTwo How can I achieve more uniform backtracking in prolog? Assuming I have: prolog will try to satisfy makeTillDone(X) in sequence: how can I achieve more uniform backtracking:
[ 0.018798828125, 0.0205078125, 0.0093994140625, 0.0118408203125, 0.008056640625, 0.0022125244140625, -0.024169921875, -0.0029754638671875, 0.0257568359375, -0.0257568359375, -0.0023651123046875, 0.00823974609375, 0.00714111328125, 0.0228271484375, 0.0157470703125, -0.00335693359375, 0...
[ 11249, 831, 69307, 1286, 61514, 4420, 125728, 214, 23, 502, 4867, 87377, 62068, 618, 3613, 9790, 40407, 3249, 5713, 60728, 13, 1542, 40, 944, 3642 ]
[ 0.05029296875, 0.041259765625, 0.1185302734375, 0.1356201171875, 0.264892578125, 0.1807861328125, 0.243408203125, 0.1405029296875, 0.0556640625, 0.1585693359375, 0.240234375, 0.1798095703125, 0.1715087890625, 0.01438140869140625, 0.1744384765625, 0.047943115234375, 0.10015869140625, ...
embed
43224720_c0
43224720
prolog
0
Title: Counting occurrences of edge color in prolog Problem title: Counting occurrences of edge color in prolog Tags: graph-theory, prolog, shortest-path Problem: Counting occurrences of edge color in prolog I have a graph defined like this: edge(a1,c1,7,blue). edge(a1,d1,3,blue). edge(a1,l1,8,red). edge(b1,c1,11,blue)...
Counting occurrences of edge color in prolog Counting occurrences of edge color in prolog graph-theory prolog shortest-path Counting Red blue:5 red:2 Counting occurrences of edge color in prolog I have a graph defined like this: and so on. I know how to write code to check if there's a path and to calculate weight and ...
[ 0.01129150390625, -0.01397705078125, -0.011962890625, 0.005889892578125, 0.006317138671875, 0.0135498046875, -0.036865234375, 0.0042724609375, 0.000339508056640625, -0.006622314453125, -0.0267333984375, -0.01904296875, 0.00848388671875, 0.00946044921875, 0.02392578125, 0.01251220703125...
[ 1311, 128396, 74918, 42, 69098, 111, 121303, 10576, 23, 502, 4867, 41382, 2347, 16610, 525, 128405, 6096, 57571, 758, 4842, 304, 61924, 3714, 33022, 18151, 12765, 60875, 74481, 57888, 82990, 3444, 140992, 116, 892, 26255, 1632, 100, 110, 43...
[ 0.1575927734375, 0.1494140625, 0.1556396484375, 0.137939453125, 0.043975830078125, 0.05078125, 0.2154541015625, 0.1943359375, 0.0289306640625, 0.149169921875, 0.2257080078125, 0.18603515625, 0.010101318359375, 0.1513671875, 0.0953369140625, 0.1551513671875, 0.1485595703125, 0.17553...
embed
50072712_c0
50072712
prolog
0
Title: Replace every instance of a list by another ONE by ONE in Prolog Problem title: Replace every instance of a list by another ONE by ONE in Prolog Tags: prolog Problem: Replace every instance of a list by another ONE by ONE in Prolog So I have a program that is supposed to replace every instance of an element in a...
Replace every instance of a list by another ONE by ONE in Prolog Replace every instance of a list by another ONE by ONE in Prolog prolog Replace ONE Prolog change_element Replace every instance of a list by another ONE by ONE in Prolog So I have a program that is supposed to replace every instance of an element in a li...
[ -0.00787353515625, 0.00142669677734375, 0.006683349609375, 0.0218505859375, -0.002410888671875, 0.008544921875, -0.0196533203125, 0.00848388671875, 0.0245361328125, -0.0103759765625, 0.00677490234375, 0.018798828125, 0.000804901123046875, 0.008056640625, 0.00982666015625, 0.00442504882...
[ 853, 23935, 11907, 110527, 5303, 15700, 31261, 390, 1250, 4867, 502, 15549, 62766, 1528, 134598, 91995, 12830, 678, 1284, 57766, 133266, 5117, 190, 138, 17932, 140992, 47143, 65572, 1031, 29479, 18151, 121011, 7103, 6528, 12921, 104851, 16750 ]
[ 0.035919189453125, 0.1788330078125, 0.120361328125, 0.2509765625, 0.1751708984375, 0.035888671875, 0.24365234375, 0.0838623046875, 0.162353515625, 0.24560546875, 0.127685546875, 0.1796875, 0.1778564453125, 0.13916015625, 0.059417724609375, 0.1707763671875, 0.1546630859375, 0.018005...
embed
26826470_c0
26826470
prolog
0
Title: reading lines into lists with prolog Problem title: reading lines into lists with prolog Tags: file, prolog, io, list Problem: reading lines into lists with prolog I have a text file with some information, each line is a list of values. I want to read each line and store it in a list with all the other lines. Th...
reading lines into lists with prolog reading lines into lists with prolog file prolog io list textFile.abc Source DataList NewLine end_of_file reading lines into lists with prolog I have a text file with some information, each line is a list of values. I want to read each line and store it in a list with all the other ...
[ 0.032470703125, -0.0167236328125, 0.0048828125, 0.01080322265625, -0.0081787109375, 0.0166015625, 0.010009765625, 0.007293701171875, -0.004669189453125, -0.035400390625, 0.005615234375, -0.00186920166015625, -0.0208740234375, -0.017578125, 0.029296875, -0.0089111328125, 0.02966308593...
[ 16454, 124519, 3934, 5303, 7, 678, 502, 4867, 11435, 22995, 7986, 174350, 2055, 238, 77641, 11809, 154663, 2356, 93232, 3564, 4390, 29822, 4677, 12638, 13315, 142424, 3444, 12301, 4343, 18151, 2060, 22829, 11675, 2046, 71924, 33022, 724, 1291...
[ 0.1976318359375, 0.2139892578125, 0.135498046875, 0.202880859375, 0.047821044921875, 0.07940673828125, 0.1566162109375, 0.22509765625, 0.122314453125, 0.1536865234375, 0.0972900390625, 0.154052734375, 0.0980224609375, 0.076416015625, 0.087646484375, 0.017730712890625, 0.085693359375,...
embed
26942682_c0
26942682
prolog
0
Title: Check list of items and requirements in prolog Problem title: Check list of items and requirements in prolog Tags: prolog Problem: Check list of items and requirements in prolog I have a problem with Prolog. If it was another language with an imperative paradigm would be easier for me, but that's not the point. ...
Check list of items and requirements in prolog Check list of items and requirements in prolog prolog Check to_get Check list of items and requirements in prolog I have a problem with Prolog. If it was another language with an imperative paradigm would be easier for me, but that's not the point. There are several items,...
[ -0.004974365234375, -0.0022125244140625, -0.006134033203125, 0.015380859375, -0.0181884765625, 0.0233154296875, -0.0218505859375, -0.007110595703125, 0.0299072265625, -0.022705078125, 0.0157470703125, 0.001953125, -0.0087890625, 0.005523681640625, -0.001434326171875, 0.0034637451171875...
[ 38679, 5303, 55769, 136, 96679, 23, 502, 4867, 47, 3794, 2967, 1250, 46876, 222530, 13, 214709, 99156, 113054, 2174, 765, 35735, 876, 26950, 21771, 12765, 2685, 959, 28282, 15190, 30646, 27117, 10, 56112, 18, 339, 418, 304 ]
[ 0.20458984375, 0.216064453125, 0.2161865234375, 0.1131591796875, 0.25439453125, 0.07391357421875, 0.1630859375, 0.22705078125, 0.0309600830078125, 0.095703125, 0.060516357421875, 0.126953125, 0.134033203125, 0.137451171875, 0.009246826171875, 0.1375732421875, 0.0285186767578125, 0....
embed
23334884_c0
23334884
prolog
0
Title: Getting max element from a list of lists in prolog Problem title: Getting max element from a list of lists in prolog Tags: dcg, prolog Problem: Getting max element from a list of lists in prolog row(Rows) --> string(_),"\n" , row(Rows). row([]) --> []. date(D/M/Y) --> integer(D), "/", integer(M), "/", integer(Y)...
Getting max element from a list of lists in prolog Getting max element from a list of lists in prolog dcg prolog a Getting Date Exchange Tape Total Moving NASDAQ NYSE Stock PerA PerB PerC PerTotal Rows Ret Rest nth1 Getting max element from a list of lists in prolog I am new to prolog and as a school assignment I need ...
[ 0.019775390625, 0.0198974609375, 0.017578125, 0.0245361328125, -0.0159912109375, 0.0142822265625, 0.007293701171875, 0.02685546875, 0.029052734375, -0.03173828125, 0.000946044921875, -0.003692626953125, 0.0107421875, -0.01104736328125, 0.0078125, -0.0022125244140625, 0.00205993652343...
[ 210732, 18389, 12830, 1295, 5303, 7, 502, 4867, 177, 25512, 104758, 50266, 33867, 2501, 242266, 22056, 9127, 68804, 908, 284, 571, 169473, 96190, 47131, 49756, 927, 10696, 95486, 33022, 56367, 1250, 95799, 33478, 83324, 107730, 23351, 214, 33...
[ 0.06884765625, 0.237060546875, 0.2135009765625, 0.0777587890625, 0.1822509765625, 0.008270263671875, 0.1202392578125, 0.2091064453125, 0.046844482421875, 0.0885009765625, 0.1295166015625, 0.0980224609375, 0.183349609375, 0.022247314453125, 0.085205078125, 0.006561279296875, 0.0350036...
embed
9775414_c0
9775414
prolog
0
Title: Keep getting the error message "Arguments are not sufficiently instantiated" can't understand why Problem title: Keep getting the error message "Arguments are not sufficiently instantiated" can't understand why Tags: recursion, successor-arithmetics, prolog, instantiation-error, exc...
Keep getting the error message "Arguments are not sufficiently instantiated" can't understand why Keep getting the error message "Arguments are not sufficiently instantiated" can't understand why recursion successor-arithmetics prolog instantiation-error exception Keep Arguments Keep getti...
[ 0.01483154296875, 0.043212890625, 0.0038299560546875, 0.02490234375, 0.01031494140625, 0.0167236328125, -0.00092315673828125, -0.0137939453125, 0.0238037109375, -0.02001953125, 0.0128173828125, -0.036376953125, -0.003204345703125, 0.0009307861328125, 0.019775390625, 0.0098876953125, ...
[ 83041, 20949, 18499, 26008, 7614, 1234, 9035, 959, 129980, 34648, 14, 27686, 3768, 28219, 15400, 195625, 1830, 39457, 42, 8962, 502, 4867, 188800, 131527, 112140, 621, 7, 127664, 1363, 390, 66044, 79986, 3525, 1250, 237875, 8781, 44402, 20923...
[ 0.2015380859375, 0.1246337890625, 0.1912841796875, 0.079345703125, 0.0968017578125, 0.2109375, 0.1309814453125, 0.1334228515625, 0.18603515625, 0.1412353515625, 0.1488037109375, 0.0919189453125, 0.049346923828125, 0.1024169921875, 0.017425537109375, 0.139892578125, 0.03460693359375, ...
embed
67888820_c1
67888820
prolog
1
L],N), noccurrences(N,L,LR). noccurrences(N,[X|L],LR):-occurrences(X,[X|L],A),A\==N, noccurrences(N,L,LR). %%Finds a value in a list find(Y,[Y|_]). find(Y,[X|L]):- find(Y,L). %%%This function returns a list with the nodes of the tree leaves(nil,[]). leaves(t(Root,Left,Right),[Root|Res]):- leaves(Left,Lres), leaves(Righ...
L],N), noccurrences(N,L,LR). noccurrences(N,[X|L],LR):-occurrences(X,[X|L],A),A\==N, noccurrences(N,L,LR). %%Finds a value in a list find(Y,[Y|_]). find(Y,[X|L]):- find(Y,L). %%%This function returns a list with the nodes of the tree leaves(nil,[]). leaves(t(Root,Left,Right),[Root|Res]):- leaves(Left,Lres), leaves(Righ...
[ 0.0189208984375, 0.012939453125, 0.003143310546875, -0.0050048828125, 0.03564453125, 0.0169677734375, -0.025146484375, -0.0133056640625, 0.022216796875, -0.050048828125, -0.000682830810546875, -0.00897216796875, 0.01470947265625, -0.0006256103515625, 0.005218505859375, 0.01190185546875...
[ 339, 268, 839, 247, 32074, 64240, 69098, 866, 138535, 194, 1542, 58745, 6652, 284, 69112, 204582, 10, 34292, 23, 5303, 7413, 1723, 454, 3949, 73243, 32354, 30646, 678, 110, 988, 111, 53201, 31358, 17324, 18, 12724, 818, 2480, 22553, 4332,...
[ 0.1181640625, 0.013671875, 0.09423828125, 0.027099609375, 0.1954345703125, 0.243896484375, 0.173828125, 0.094482421875, 0.1435546875, 0.00836181640625, 0.0848388671875, 0.05889892578125, 0.05328369140625, 0.068359375, 0.053253173828125, 0.16552734375, 0.0645751953125, 0.23681640625...
embed
47107786_c0
47107786
prolog
0
Title: Prolog existence_error procedure in basic example Problem title: Prolog existence_error procedure in basic example Tags: gnu-prolog, prolog Problem: Prolog existence_error procedure in basic example I'm trying to learn the basics of Prolog and keep running into a existence_error with the following code. comes_af...
Prolog existence_error procedure in basic example Prolog existence_error procedure in basic example gnu-prolog prolog Prolog existence_error comes_after does_come_after Prolog existence_error procedure in basic example I'm trying to learn the basics of Prolog and keep running into a existence_error with the following c...
[ 0.0025177001953125, 0.0211181640625, -0.00384521484375, 0.04296875, 0.0015106201171875, 0.02392578125, -0.022705078125, -0.000579833984375, 0.014404296875, -0.031005859375, 0.0152587890625, -0.0147705078125, 0.005950927734375, -0.01422119140625, 0.02587890625, -0.005096435546875, 0.0...
[ 1250, 4867, 116311, 188800, 50491, 62822, 27781, 104155, 3454, 502, 32497, 46327, 14602, 45738, 31577, 30698, 13695, 51042, 3934, 25632, 18151, 14847, 71924, 41, 39, 418, 347, 21320, 18499, 209647, 212059, 444, 20594, 44691, 71864 ]
[ 0.1895751953125, 0.268798828125, 0.2115478515625, 0.251220703125, 0.17333984375, 0.143310546875, 0.1932373046875, 0.1309814453125, 0.1099853515625, 0.121826171875, 0.1370849609375, 0.2283935546875, 0.1318359375, 0.1422119140625, 0.0015869140625, 0.0145263671875, 0.0709228515625, 0....
embed
56420612_c0
56420612
prolog
0
Title: Is there any explicit support for modulo operation in eplex library Problem title: Is there any explicit support for modulo operation in eplex library Tags: prolog, eclipse-clp, constraints Problem: Is there any explicit support for modulo operation in eplex library I am using eplex and ic library and trying to ...
Is there any explicit support for modulo operation in eplex library Is there any explicit support for modulo operation in eplex library prolog eclipse-clp constraints FirstResult Result Val Here NewVal SecondResult Is there any explicit support for modulo operation in eplex library I am using eplex and ic library and t...
[ -0.01214599609375, -0.0034942626953125, 0.01251220703125, 0.027099609375, 0.0242919921875, 0.0206298828125, 0.0142822265625, 0.004302978515625, 0.0091552734375, -0.035400390625, 0.011962890625, -0.003173828125, 0.0234375, -0.0262451171875, 0.0089111328125, -0.011962890625, -0.0110473...
[ 2499, 143726, 8060, 100, 140807, 41018, 28, 44974, 35773, 1294, 502, 4867, 106371, 184, 26775, 158, 2816, 4288, 23972, 7, 7136, 126684, 4769, 11853, 2356, 42272, 77648, 23, 1771, 22691, 66044, 144227, 182867, 117474, 110, 91853, 18151, 2811, ...
[ 0.0206756591796875, 0.1685791015625, 0.2110595703125, 0.045562744140625, 0.289306640625, 0.17626953125, 0.07049560546875, 0.284423828125, 0.1728515625, 0.0689697265625, 0.10888671875, 0.153564453125, 0.1624755859375, 0.0858154296875, 0.138916015625, 0.0284576416015625, 0.138305664062...
embed
72277559_c0
72277559
prolog
0
Title: using greedy algorithm search in lists Problem title: using greedy algorithm search in lists Tags: swi-prolog, prolog Problem: using greedy algorithm search in lists Given a list of positive integer Items whose elements are guaranteed to be in sorted ascending order, and a positive integer Goal, and Output is a ...
using greedy algorithm search in lists using greedy algorithm search in lists swi-prolog prolog greedy Output Input Goal Items Rest sum_list using greedy algorithm search in lists Given a list of positive integer Items whose elements are guaranteed to be in sorted ascending order, and a positive integer Goal, and Outpu...
[ -0.0135498046875, 0.0172119140625, 0.0203857421875, 0.00347900390625, -0.02001953125, 0.0234375, -0.0167236328125, -0.004150390625, 0.01104736328125, -0.0234375, 0.0198974609375, -0.00173187255859375, 0.006072998046875, 0.00811767578125, 0.001190185546875, 0.02783203125, -0.000085830...
[ 17368, 3514, 297, 53, 234873, 33938, 23, 5303, 91, 2452, 3454, 4867, 502, 13538, 7077, 360, 2016, 289, 78426, 49756, 10554, 6562, 77878, 24491, 892, 1505, 80854, 142027, 17497, 82800, 12989, 17262, 571, 441, 39958, 1295, 55769, 25842, 15190...
[ 0.04083251953125, 0.1927490234375, 0.147705078125, 0.1585693359375, 0.214599609375, 0.227294921875, 0.087158203125, 0.2099609375, 0.024383544921875, 0.165771484375, 0.0875244140625, 0.195556640625, 0.08544921875, 0.1439208984375, 0.1602783203125, 0.09295654296875, 0.166015625, 0.15...
embed
46278167_c0
46278167
prolog
0
Title: How to impelement correspond function in prolog Problem title: How to impelement correspond function in prolog Tags: prolog Problem: How to impelement correspond function in prolog I am a beginner of Prolog and I'd like to know how to implement this correspond function. correspond(E1, L1, E2, L2) this holds when...
How to impelement correspond function in prolog How to impelement correspond function in prolog prolog How Elt1 List1 Elt2 List2 nth0 Index How to impelement correspond function in prolog I am a beginner of Prolog and I'd like to know how to implement this correspond function. Here is what I have tried by now: I wanted...
[ 0.002960205078125, 0.004913330078125, 0.0206298828125, -0.0038909912109375, -0.01043701171875, 0.00439453125, 0.01007080078125, 0.0224609375, 0.0164794921875, -0.0322265625, 0.01416015625, -0.0234375, -0.00250244140625, -0.00125885009765625, 0.018798828125, -0.0135498046875, 0.006164...
[ 11249, 47, 48793, 19929, 42518, 32354, 23, 502, 4867, 540, 18, 418, 32036, 304, 927, 2389, 31471, 1679, 1250, 1884, 3642, 29479, 37842, 36663, 4527, 237, 81814, 2046, 34292, 241, 18151, 30646, 87599, 22225 ]
[ 0.0758056640625, 0.05633544921875, 0.1854248046875, 0.248779296875, 0.320556640625, 0.1943359375, 0.03759765625, 0.14501953125, 0.22802734375, 0.10595703125, 0.0926513671875, 0.08050537109375, 0.1434326171875, 0.13525390625, 0.08599853515625, 0.102294921875, 0.2130126953125, 0.0210...
embed
50089282_c0
50089282
prolog
0
Title: Recursive definitions in Prolog Problem title: Recursive definitions in Prolog Tags: prolog Problem: Recursive definitions in Prolog How would I write a recursive definition in Prolog to create an alternating list in the following way : alternate(K, L, M) holds if the list M is obtained by taking elements altern...
Recursive definitions in Prolog Recursive definitions in Prolog prolog Recursive Prolog Firstk Restk Firstl Restl Recursive definitions in Prolog How would I write a recursive definition in Prolog to create an alternating list in the following way : alternate(K, L, M) holds if the list M is obtained by taking elements ...
[ 0.0029296875, 0.0230712890625, 0.018798828125, -0.00445556640625, 0.017333984375, 0.01007080078125, -0.011474609375, 0.019775390625, 0.0089111328125, -0.0067138671875, -0.002593994140625, -0.0067138671875, -0.00543212890625, 0.022216796875, 0.0263671875, 0.01055908203125, 0.022338867...
[ 853, 48650, 5844, 80934, 1250, 4867, 502, 23972, 92, 49756, 141, 2806, 33022, 195625, 23, 28282, 75939, 214, 5303, 3917, 13, 605, 339, 276, 16401, 113054, 35971, 80854, 341, 136, 51713, 47143, 108975, 3564, 16750, 81887, 2967, 20697 ]
[ 0.10394287109375, 0.2357177734375, 0.208984375, 0.1966552734375, 0.1573486328125, 0.251220703125, 0.10107421875, 0.0887451171875, 0.110107421875, 0.153076171875, 0.1094970703125, 0.010009765625, 0.101806640625, 0.2344970703125, 0.005126953125, 0.1002197265625, 0.1702880859375, 0.07...
embed
43529810_c0
43529810
prolog
0
Title: DNA Matching in Prolog Problem title: DNA Matching in Prolog Tags: prolog Problem: DNA Matching in Prolog I am attempting to learn basic Prolog. I have read some basic tutorials on the basic structures of lists, variables, and if/and logic. A project I am attempting to do to help learn some of this is to match D...
DNA Matching in Prolog DNA Matching in Prolog prolog DNA Matching Prolog DNA Matching in Prolog I am attempting to learn basic Prolog. I have read some basic tutorials on the basic structures of lists, variables, and if/and logic. A project I am attempting to do to help learn some of this is to match DNA sequences. Ess...
[ 0.007598876953125, 0.0439453125, 0.00579833984375, 0.030029296875, 0.0128173828125, 0.0125732421875, -0.0208740234375, 0.023193359375, 0.00099945068359375, -0.0274658203125, 0.0150146484375, 0.0106201171875, -0.00726318359375, -0.0022430419921875, 0.00150299072265625, -0.00350952148437...
[ 27583, 67407, 214, 23, 1250, 4867, 502, 81887, 30698, 62822, 12301, 57143, 45646, 5303, 77336, 2174, 62775, 13452, 4358, 14858, 40, 26513, 5170, 179769, 3444, 39531, 184, 75870, 89536, 140992, 35064, 8781, 3525, 82424, 26747, 1810, 26859, 132...
[ 0.2357177734375, 0.253662109375, 0.09881591796875, 0.040283203125, 0.15576171875, 0.23388671875, 0.0982666015625, 0.0838623046875, 0.05560302734375, 0.115478515625, 0.002197265625, 0.0726318359375, 0.08770751953125, 0.152099609375, 0.09259033203125, 0.03961181640625, 0.1668701171875,...
embed
4356228_c0
4356228
prolog
0
Title: Prolog - sum of row in matrix Problem title: Prolog - sum of row in matrix Tags: matrix, prolog Problem: Prolog - sum of row in matrix An n x n matrix can be represented as a list of n lists, each with n elements, the matrix could actually 1 2 3 4 5 6 7 8 9 written as [[1, 2, 3], [4, 5, 6], [7, 8, 9]]. I need to...
Prolog - sum of row in matrix Prolog - sum of row in matrix matrix prolog Prolog Length Sum Row NewI Value NewSum NewJ Prolog - sum of row in matrix An n x n matrix can be represented as a list of n lists, each with n elements, the matrix could actually 1 2 3 4 5 6 7 8 9 written as [[1, 2, 3], [4, 5, 6], [7, 8, 9]]. I ...
[ 0.009765625, 0.01190185546875, 0.02880859375, 0.0150146484375, -0.026611328125, -0.0142822265625, 0.0019683837890625, 0.016845703125, 0.0216064453125, -0.00933837890625, 0.006988525390625, -0.025146484375, -0.0162353515625, -0.0169677734375, -0.0028839111328125, -0.001739501953125, 0...
[ 1250, 4867, 10554, 111, 15555, 23, 50944, 425, 502, 77554, 36335, 96190, 2356, 568, 190060, 316, 1375, 653, 1022, 831, 33636, 237, 5303, 12638, 80854, 5809, 20653, 106, 116, 138, 201, 190, 305, 361, 382, 483, 59121, 110558, 418, 966, 38...
[ 0.2122802734375, 0.2724609375, 0.2493896484375, 0.1888427734375, 0.2491455078125, 0.09954833984375, 0.236572265625, 0.1400146484375, 0.169921875, 0.1043701171875, 0.2330322265625, 0.2381591796875, 0.1129150390625, 0.098876953125, 0.2042236328125, 0.2286376953125, 0.1328125, 0.10272...
embed
20060840_c1
20060840
prolog
1
. ?-suspect(Killer,mrBoddy) Killer = unique_suspect. Part C: Add a single factto your database that will result in there being a unique suspect. Clearly indicate this line in your source comments so that it can be removed/added for grading. ?-suspect(Killer,mrBoddy) Killer = unique_suspect. Whenever I type in suspect(K...
. ?-suspect(Killer,mrBoddy) Killer = unique_suspect. Part C: Add a single factto your database that will result in there being a unique suspect. Clearly indicate this line in your source comments so that it can be removed/added for grading. ?-suspect(Killer,mrBoddy) Killer = unique_suspect. Whenever I type in suspect(K...
[ 0.00299072265625, 0.0203857421875, 0.015869140625, -0.003173828125, -0.0030670166015625, 0.03515625, -0.00183868408203125, -0.004302978515625, 0.0133056640625, -0.0299072265625, -0.018310546875, -0.0146484375, 0.0164794921875, -0.0031280517578125, 0, -0.00037384033203125, 0.012268066...
[ 5, 705, 9, 1159, 16711, 18, 132, 605, 33150, 76492, 12647, 27376, 16, 104431, 56, 2203, 36998, 16995, 313, 29117, 11001, 15824, 188, 935, 63399, 16750, 2685, 8035, 10, 92610, 117414, 13315, 31344, 24626, 184750, 69819, 6671, 214, 14847, 3...
[ 0.009429931640625, 0.134765625, 0.029998779296875, 0.1859130859375, 0.29541015625, 0.175537109375, 0.053466796875, 0.1580810546875, 0.25341796875, 0.0855712890625, 0.1270751953125, 0.21337890625, 0.0374755859375, 0.273681640625, 0.266845703125, 0.130615234375, 0.25, 0.0418395996093...
embed
70160751_c0
70160751
prolog
0
Title: Prolog check if list X has any duplicates Problem title: Prolog check if list X has any duplicates Tags: prolog Problem: Prolog check if list X has any duplicates I have the function already but it is not working exactly as I want it to. The function I have is below.. isSet(List) :- \+ ( select(Element, List, Ta...
Prolog check if list X has any duplicates Prolog check if list X has any duplicates prolog Prolog List Element Tail Prolog check if list X has any duplicates I have the function already but it is not working exactly as I want it to. The function I have is below.. When I do isSet([1,2,3]) it gives me true which is expec...
[ 0.003997802734375, 0.00927734375, 0.0289306640625, 0.01239013671875, -0.0257568359375, 0.02392578125, -0.0003814697265625, -0.0162353515625, 0.0027618408203125, -0.006195068359375, -0.00213623046875, 0.0174560546875, 0.01092529296875, 0.00323486328125, -0.013916015625, 0.032958984375, ...
[ 1250, 4867, 12765, 2174, 5303, 1193, 1556, 2499, 171763, 1636, 502, 32036, 48325, 1218, 379, 32354, 21771, 959, 20697, 66161, 237, 3444, 35064, 83, 294, 126, 133063, 96386, 76199, 163, 29568, 84751, 98320, 2367, 41206, 26785, 27875, 450, 72...
[ 0.1654052734375, 0.2366943359375, 0.1788330078125, 0.1114501953125, 0.1904296875, 0.1241455078125, 0.1060791015625, 0.14306640625, 0.263671875, 0.16552734375, 0.1378173828125, 0.14501953125, 0.1224365234375, 0.0911865234375, 0.0904541015625, 0.1337890625, 0.1484375, 0.0239105224609...
embed
65844610_c0
65844610
prolog
0
Title: Predicate returning false Problem title: Predicate returning false Tags: prolog Problem: Predicate returning false I'm having trouble with the following predicate: treeToList(void, []). treeToList(arbol(X, HI1, HD1), L) :- treeToList(HI1, L1), treeToList(HD1, L2), append(L1, [X|L2], L). maximumInList([X], X). ma...
Predicate returning false Predicate returning false prolog Predicate HI1 HD1 Predicate returning false I'm having trouble with the following predicate: TreeToList gets a tree and returns a list with all of its nodes. Meanwhile maximumInList gets a list and returns the maximum element in the list. Both of these predicat...
[ 0.0054931640625, 0.0010986328125, -0.007171630859375, 0.007415771484375, -0.004852294921875, 0.01513671875, -0.008544921875, 0.00157928466796875, 0.003326416015625, -0.031494140625, 0.006744384765625, 0.00101470947265625, -0.0133056640625, -0.003265380859375, 0.0252685546875, 0.0067749...
[ 7145, 2063, 67, 30646, 98320, 502, 4867, 35848, 418, 4732, 63134, 1653, 101344, 7763, 154663, 53201, 5303, 110, 988, 38132, 4153, 12830, 4488, 5885, 11651, 4568, 18389, 5021, 112, 62731, 134598, 5117, 2046, 339, 115081, 1250, 6305 ]
[ 0.1845703125, 0.1949462890625, 0.061431884765625, 0.201904296875, 0.2412109375, 0.14697265625, 0.20751953125, 0.135986328125, 0.05255126953125, 0.122314453125, 0.053314208984375, 0.1630859375, 0.151123046875, 0.172607421875, 0.1812744140625, 0.1358642578125, 0.09417724609375, 0.075...
embed
30441388_c0
30441388
prolog
0
Title: procedure doesn't work for evey pattern in prolog Problem title: procedure doesn't work for evey pattern in prolog Tags: counter, prolog Problem: procedure doesn't work for evey pattern in prolog I try to find how many children a person have. Created my sample space and in find procedure I should count...
procedure doesn't work for evey pattern in prolog procedure doesn't work for evey pattern in prolog counter prolog Result procedure doesn't work for evey pattern in prolog I try to find how many children a person have. Created my sample space and in find procedure I should count the numbers of children and pr...
[ -0.0042724609375, 0.0162353515625, -0.013916015625, 0.0172119140625, -0.0198974609375, 0.0137939453125, -0.0162353515625, 0.007537841796875, 0.013671875, -0.05517578125, 0.005401611328125, -0.018310546875, -0.000644683837890625, 0.00750732421875, 0.042724609375, 0.01116943359375, 0.0...
[ 50491, 22027, 3768, 18, 4488, 100, 28, 67709, 103510, 502, 4867, 23, 105416, 126684, 9790, 7413, 3642, 5941, 20020, 3445, 765, 151313, 121413, 32628, 5608, 54529, 101935, 28412, 34292, 947, 33209, 107730, 64, 6056, 7077, 37842, 15549, 1542, ...
[ 0.2403564453125, 0.05706787109375, 0.0640869140625, 0.07891845703125, 0.138671875, 0.072509765625, 0.0723876953125, 0.22998046875, 0.2386474609375, 0.14892578125, 0.2205810546875, 0.0282135009765625, 0.1851806640625, 0.1732177734375, 0.047882080078125, 0.1376953125, 0.034942626953125...
embed
38543599_c0
38543599
prolog
0
Title: Remove incorrect subsequent solutions without once Problem title: Remove incorrect subsequent solutions without once Tags: dcg, clpfd, prolog Problem: Remove incorrect subsequent solutions without once I have a predicate that finds the correct solution but then goes on to find solutions which are not right. ?- d...
Remove incorrect subsequent solutions without once Remove incorrect subsequent solutions without once dcg clpfd prolog Remove data_threshold_nonredundantbumps use_module fd_length equidistant_stride equidistant_stride_ consecutive_ascending_integers consecutive_ascending_integers_from bool01_t if_ C_1 Then_0 Else_0 Tru...
[ -0.0067138671875, 0.0201416015625, 0.00933837890625, 0.01513671875, 0.005096435546875, 0.0142822265625, -0.0206298828125, -0.013671875, 0.002044677734375, -0.0341796875, -0.006011962890625, 0.0223388671875, -0.003936767578125, 0.0040283203125, 0.020751953125, 0.027099609375, 0.004119...
[ 181139, 214552, 221419, 51347, 15490, 24145, 238, 177, 33139, 39557, 71, 502, 4867, 2053, 2109, 16200, 6431, 2822, 35405, 62420, 6423, 4527, 83279, 1238, 23986, 60715, 56883, 7655, 148390, 329, 33770, 142484, 6746, 2174, 115187, 2389, 184431, ...
[ 0.1728515625, 0.221435546875, 0.2459716796875, 0.21044921875, 0.144775390625, 0.17431640625, 0.00286865234375, 0.09228515625, 0.009063720703125, 0.049591064453125, 0.08013916015625, 0.1131591796875, 0.145263671875, 0.105224609375, 0.07940673828125, 0.146240234375, 0.05914306640625, ...
embed
6225033_c0
6225033
prolog
0
Title: prolog fill a list automatically with variables in loop Problem title: prolog fill a list automatically with variables in loop Tags: variables, sudoku, prolog, list Problem: prolog fill a list automatically with variables in loop how to fill a list automatically with variables? like for(i=1;i<=9,i++){ addtoanyli...
prolog fill a list automatically with variables in loop prolog fill a list automatically with variables in loop variables sudoku prolog list X_i sudoku_size_check Listlength RangeList Possible sudoku_settings prolog fill a list automatically with variables in loop how to fill a list automatically with variables? like s...
[ 0.004852294921875, -0.001190185546875, -0.00457763671875, 0.008544921875, -0.04052734375, 0.0150146484375, -0.0130615234375, 0.016357421875, 0.0157470703125, -0.01324462890625, 0.006744384765625, -0.00958251953125, 0.006500244140625, 0.004150390625, 0.00506591796875, 0.01251220703125, ...
[ 502, 4867, 26292, 5303, 191082, 678, 77336, 23, 40956, 8932, 38067, 1193, 14, 62539, 78292, 32036, 23986, 142462, 154663, 115861, 89840, 3642, 47, 10, 221, 16750, 1884, 339, 1369, 1542, 418, 304, 363, 617, 758, 910, 966, 1019, 1126, 3444,...
[ 0.109619140625, 0.2183837890625, 0.2122802734375, 0.2225341796875, 0.26171875, 0.1083984375, 0.2498779296875, 0.054107666015625, 0.193603515625, 0.086181640625, 0.162353515625, 0.0477294921875, 0.04052734375, 0.097412109375, 0.10687255859375, 0.072998046875, 0.0156402587890625, 0.0...
embed
63852186_c1
63852186
prolog
1
trying to run: import org.jpl7.*; import java.util.Map; public class Main { public static void main(String[] args) { Query q = new Query("true"); q.hasSolution(); Map<String,Term>[] res = q.allSolutions(); for (int i = 0; i < res.length; i++) { System.out.println(res[i]); } } } Code signals: java.lang.UnsatisfiedLinkE...
trying to run: import org.jpl7.*; import java.util.Map; public class Main { public static void main(String[] args) { Query q = new Query("true"); q.hasSolution(); Map<String,Term>[] res = q.allSolutions(); for (int i = 0; i < res.length; i++) { System.out.println(res[i]); } } } Code signals: java.lang.UnsatisfiedLinkE...
[ 0.007720947265625, 0.017822265625, 0.008056640625, 0.02197265625, -0.039794921875, -0.0013885498046875, 0.0030975341796875, -0.021728515625, -0.006622314453125, -0.0283203125, -0.00494384765625, -0.00762939453125, -0.018310546875, -0.00555419921875, 0.003448486328125, 0.0194091796875, ...
[ 31577, 47, 11675, 12, 24927, 30910, 170, 2424, 966, 1639, 74, 79, 330, 34, 3675, 166179, 3835, 18507, 12321, 6, 201939, 2292, 71, 5201, 71713, 214, 79459, 58836, 53, 8096, 2203, 3525, 9774, 13, 10557, 102588, 1363, 42719, 35484, 3332, 5...
[ 0.2103271484375, 0.0853271484375, 0.2335205078125, 0.04046630859375, 0.2181396484375, 0.2086181640625, 0.11083984375, 0.2103271484375, 0.1875, 0.081298828125, 0.015167236328125, 0.117431640625, 0.2076416015625, 0.19091796875, 0.1854248046875, 0.21142578125, 0.09423828125, 0.1954345...
embed
29263385_c0
29263385
prolog
0
Title: store Prolog answers to a file Problem title: store Prolog answers to a file Tags: writefile, swi-prolog, prolog, file-storage Problem: store Prolog answers to a file I'm working with ALEPH reasoning engine in SWI-Prolog. I want to save the rules that ALEPH infers and shows them in SWI-Prolog console, but I have...
store Prolog answers to a file store Prolog answers to a file writefile swi-prolog prolog file-storage Prolog Rule Pos Neg store Prolog answers to a file I'm working with ALEPH reasoning engine in SWI-Prolog. I want to save the rules that ALEPH infers and shows them in SWI-Prolog console, but I have no idea how can I d...
[ 0.03125, -0.0155029296875, 0.016845703125, 0.0291748046875, 0.0068359375, 0.036376953125, 0.0087890625, 0.00482177734375, -0.0033416748046875, -0.0078125, -0.0164794921875, 0.003997802734375, -0.02099609375, -0.0101318359375, 0.0308837890625, 0.0023040771484375, 0.0194091796875, -0...
[ 4343, 1250, 4867, 35166, 7, 47, 11435, 33022, 29822, 2452, 3454, 502, 140464, 139118, 13498, 799, 177, 29644, 54259, 31635, 87907, 38969, 10752, 3444, 30098, 91736, 53498, 45831, 2856, 130250, 6528, 121413, 49726, 127887, 23, 77391, 50491, 90...
[ 0.2158203125, 0.1817626953125, 0.255615234375, 0.211181640625, 0.07525634765625, 0.0841064453125, 0.170654296875, 0.04681396484375, 0.1531982421875, 0.1407470703125, 0.1373291015625, 0.137939453125, 0.1610107421875, 0.185546875, 0.1112060546875, 0.05908203125, 0.07916259765625, 0.1...
embed
46505381_c0
46505381
prolog
0
Title: Prolog ERROR: Undefined procedure: transpose/2 (DWIM could not correct goal) Problem title: Prolog ERROR: Undefined procedure: transpose/2 (DWIM could not correct goal) Tags: prolog Problem: Prolog ERROR: Undefined procedure: transpose/2 (DWIM could not correct goal) I have just started with Prolog for one of my...
Prolog ERROR: Undefined procedure: transpose/2 (DWIM could not correct goal) Prolog ERROR: Undefined procedure: transpose/2 (DWIM could not correct goal) prolog Prolog ERROR Undefined DWIM Prolog ERROR: Undefined procedure: transpose/2 (DWIM could not correct goal) I have just started with Prolog for one of my classes ...
[ 0.01080322265625, 0.0269775390625, 0.01409912109375, 0.00360107421875, -0.01611328125, 0.015869140625, -0.01904296875, -0.014404296875, -0.00445556640625, -0.0196533203125, 0.01080322265625, 0.0076904296875, -0.0181884765625, 0.005340576171875, -0.0125732421875, 0.0069580078125, 0.00...
[ 1250, 4867, 151206, 24638, 79912, 5983, 50491, 3900, 78381, 12477, 38969, 594, 5809, 959, 26785, 69236, 502, 30439, 17199, 397, 26859, 61112, 62822, 92814, 23, 978, 24908, 32354, 831, 11814, 105237, 5608, 11343, 32562, 15824, 91736, 5117, 452...
[ 0.2005615234375, 0.2705078125, 0.138671875, 0.1175537109375, 0.09375, 0.209228515625, 0.192138671875, 0.2322998046875, 0.239990234375, 0.2252197265625, 0.1512451171875, 0.152099609375, 0.076904296875, 0.06805419921875, 0.1695556640625, 0.2198486328125, 0.10748291015625, 0.103515625...
embed
36388397_c0
36388397
prolog
0
Title: association inheritance in prolog Problem title: association inheritance in prolog Tags: rules, prolog, inheritance Problem: association inheritance in prolog I am trying to have associations from an object be applicable to descendant objects for an assignment. whatProperty(canary, X, Y). generates colour, yello...
association inheritance in prolog association inheritance in prolog rules prolog inheritance Object association inheritance in prolog I am trying to have associations from an object be applicable to descendant objects for an assignment. generates colour, yellow but not properties that should have been inherited from bi...
[ 0.021484375, 0.0001735687255859375, 0.01080322265625, 0.0206298828125, -0.00144195556640625, -0.00933837890625, 0.00946044921875, 0.00677490234375, 0.00787353515625, -0.0400390625, 0.008056640625, 0.0103759765625, -0.00921630859375, -0.005035400390625, -0.013427734375, 0.00350952148437...
[ 125413, 23, 3334, 217, 7154, 502, 4867, 91736, 134549, 31577, 765, 151747, 1295, 36746, 152431, 47, 60887, 1236, 95486, 139392, 134855, 205811, 1284, 959, 183871, 5608, 86151, 263, 71, 136, 26249, 40059, 18151, 134598, 29459, 91306, 1193, 10,...
[ 0.256103515625, 0.0970458984375, 0.1951904296875, 0.1241455078125, 0.07427978515625, 0.1590576171875, 0.2435302734375, 0.1468505859375, 0.217041015625, 0.06817626953125, 0.037841796875, 0.245849609375, 0.04400634765625, 0.1912841796875, 0.1334228515625, 0.024261474609375, 0.163818359...
embed
28054055_c0
28054055
prolog
0
Title: How do I &quot;reduce&quot; a Prolog list of pairs? Problem title: How do I &quot;reduce&quot; a Prolog list of pairs? Tags: prolog Problem: How do I "reduce" a Prolog list of pairs? I'm trying to do some graph analysis using PROLOG. In particular I want a list of pairs which indicate the number of nodes at each...
How do I &quot;reduce&quot; a Prolog list of pairs? How do I &quot;reduce&quot; a Prolog list of pairs? prolog How Prolog How do I "reduce" a Prolog list of pairs? I'm trying to do some graph analysis using PROLOG. In particular I want a list of pairs which indicate the number of nodes at each deeper level from the roo...
[ -0.01507568359375, 0.00384521484375, 0.0107421875, 0.01708984375, 0.0054931640625, 0.00714111328125, -0.03369140625, -0.0198974609375, 0.01165771484375, -0.01708984375, 0.0162353515625, -0.020263671875, 0.01031494140625, -0.008544921875, 0.009765625, -0.00103759765625, -0.00860595703...
[ 11249, 107, 106357, 1250, 4867, 5303, 80836, 7, 87, 502, 54, 111, 31577, 41382, 114137, 10514, 47510, 3444, 117414, 14012, 110, 988, 12638, 53894, 56, 17366, 1295, 74855, 27489, 3173, 22799, 34292, 54529, 26366, 34390, 276, 47, 541, 361, ...
[ 0.0706787109375, 0.1961669921875, 0.2408447265625, 0.183837890625, 0.2442626953125, 0.20556640625, 0.25390625, 0.09942626953125, 0.0282135009765625, 0.10693359375, 0.037933349609375, 0.01666259765625, 0.002685546875, 0.154296875, 0.1158447265625, 0.1356201171875, 0.2127685546875, 0...
embed
37226420_c0
37226420
prolog
0
Title: Insert elements of one list to another list recursively in Prolog Problem title: Insert elements of one list to another list recursively in Prolog Tags: prolog, recursion, list Problem: Insert elements of one list to another list recursively in Prolog I'm still learning the concept of recursion. I want to add el...
Insert elements of one list to another list recursively in Prolog Insert elements of one list to another list recursively in Prolog prolog recursion list Insert Prolog Insert elements of one list to another list recursively in Prolog I'm still learning the concept of recursion. I want to add elements of one list to the...
[ -0.0152587890625, 0.0166015625, 0.0262451171875, 0.00994873046875, -0.0123291015625, 0.00927734375, -0.030029296875, -0.01287841796875, -0.008056640625, -0.0218505859375, 0.0133056640625, -0.0133056640625, 0.000385284423828125, 0.004913330078125, 0.01031494140625, 0.0078125, 0.009826...
[ 360, 33657, 80854, 1632, 5303, 47, 15700, 195625, 5844, 1250, 4867, 502, 1830, 52080, 23755, 3444, 15190, 10336, 27169, 1916, 171763, 18151, 4488, 5885, 34627, 15490, 9790, 2301, 18, 2046, 84751, 140992, 28219, 32562, 183540, 18113, 1653, 206...
[ 0.0675048828125, 0.1962890625, 0.172119140625, 0.028106689453125, 0.16650390625, 0.083251953125, 0.05047607421875, 0.2232666015625, 0.1361083984375, 0.15087890625, 0.217529296875, 0.1123046875, 0.1158447265625, 0.01287841796875, 0.01837158203125, 0.051971435546875, 0.1363525390625, ...
embed
64759888_c0
64759888
prolog
0
Title: find the list of all airports in a country in prolog Problem title: find the list of all airports in a country in prolog Tags: prolog Problem: find the list of all airports in a country in prolog This is my flightdb.pl #flight(citya ,cityb) flight(dublin, london). flight(cork, moscow). flight(chicago, dublin). f...
find the list of all airports in a country in prolog find the list of all airports in a country in prolog prolog sao_paulo list_airport find the list of all airports in a country in prolog This is my flightdb.pl I am trying to get all the airports in the particular country this is the predicate that I wrote I have just...
[ 0.00811767578125, 0.007537841796875, 0.000934600830078125, 0.02001953125, 0.007415771484375, 0.00762939453125, -0.007171630859375, 0.021728515625, 0.01177978515625, -0.0281982421875, 0.01055908203125, -0.0238037109375, -0.01177978515625, -0.019775390625, -0.00860595703125, -0.007537841...
[ 7413, 5303, 111, 756, 146619, 7, 23, 23295, 502, 4867, 6284, 763, 10391, 7341, 6982, 113014, 48073, 2424, 31577, 2046, 70, 17311, 1653, 2063, 54397, 26859, 678, 62775, 26785 ]
[ 0.10400390625, 0.1767578125, 0.025726318359375, 0.134033203125, 0.257080078125, 0.0731201171875, 0.049835205078125, 0.1558837890625, 0.141845703125, 0.2177734375, 0.1253662109375, 0.1439208984375, 0.18505859375, 0.1407470703125, 0.1153564453125, 0.08734130859375, 0.129150390625, 0....
embed
26160807_c0
26160807
prolog
0
Title: Move every second element to the back of a list, recursively Problem title: Move every second element to the back of a list, recursively Tags: difference-lists, prolog, recursion Problem: Move every second element to the back of a list, recursively I'm looking for a way to shuffle a list of numbers in a specific...
Move every second element to the back of a list, recursively Move every second element to the back of a list, recursively difference-lists prolog recursion Move List Shuffled Move every second element to the back of a list, recursively I'm looking for a way to shuffle a list of numbers in a specific way. shuffle([1, 2,...
[ -0.004180908203125, 0.0196533203125, 0.0145263671875, 0.0078125, -0.002899169921875, 0.027099609375, -0.029052734375, 0.020751953125, 0.01324462890625, 0.0177001953125, 0.014404296875, 0.0263671875, -0.0081787109375, 0.021240234375, 0.009765625, 0.0181884765625, 0.0078125, 0.001541...
[ 135828, 11907, 17932, 12830, 47, 4420, 111, 5303, 195625, 5844, 60212, 6562, 502, 4867, 1830, 32036, 13684, 4902, 6259, 16487, 3917, 170052, 10, 101935, 29458, 132, 1065, 418, 116, 138, 201, 190, 305, 361, 382, 483, 209, 534, 427, 5608, ...
[ 0.1624755859375, 0.107666015625, 0.2054443359375, 0.168701171875, 0.1324462890625, 0.208740234375, 0.072265625, 0.2086181640625, 0.2052001953125, 0.116455078125, 0.185302734375, 0.1817626953125, 0.11181640625, 0.1661376953125, 0.133056640625, 0.1834716796875, 0.076904296875, 0.1712...
embed
33589493_c1
33589493
prolog
1
7,3,9,5,6,7,5,_#689(6:8),_#710(4:8..9),_#731(4:6:8..9),_#752(6:8..9),1,2,3,_#828(2..3),9,_#862(2..3:6),5,1,_#909(2:6),7,8,4,8,_#990(2:4:7),1,6,_#1037(2..5:9),_#1058(2:5:9),_#1079(4..5),_#1100(3..4:7),_#1121(5:7),5,_#1163(4:6..7),_#1184(4:6..7),_#1205(1:3..4:8),_#1226(3..4:8),_#1247(1:8),_#1268(4:6:8),9,2,9,3,_#1341(2:4...
7,3,9,5,6,7,5,_#689(6:8),_#710(4:8..9),_#731(4:6:8..9),_#752(6:8..9),1,2,3,_#828(2..3),9,_#862(2..3:6),5,1,_#909(2:6),7,8,4,8,_#990(2:4:7),1,6,_#1037(2..5:9),_#1058(2:5:9),_#1079(4..5),_#1100(3..4:7),_#1121(5:7),5,_#1163(4:6..7),_#1184(4:6..7),_#1205(1:3..4:8),_#1226(3..4:8),_#1247(1:8),_#1268(4:6:8),9,2,9,3,_#1341(2:4...
[ -0.00750732421875, 0.029296875, 0.00567626953125, 0.0240478515625, 0.001220703125, 0.03466796875, -0.0218505859375, -0.0162353515625, 0.0223388671875, 0.0361328125, -0.0159912109375, -0.0303955078125, 0.0038604736328125, 0.01007080078125, -0.01153564453125, 0.00958251953125, -0.00360...
[ 361, 4, 125157, 104629, 109631, 454, 4904, 181304, 139303, 12, 50490, 966, 963, 105801, 1019, 5, 1126, 247, 5016, 910, 6873, 304, 133063, 363, 175283, 54753, 21320, 15276, 59690, 758, 418, 5039, 136005, 116574, 61158, 617, 36076, 163090, 10...
[ 0.1636962890625, 0.0980224609375, 0.252197265625, 0.245361328125, 0.26025390625, 0.0731201171875, 0.1246337890625, 0.279541015625, 0.1103515625, 0.018341064453125, 0.1785888671875, 0.110595703125, 0.2437744140625, 0.095703125, 0.09429931640625, 0.006683349609375, 0.1949462890625, 0...
embed
50429881_c0
50429881
prolog
0
Title: SLD resolution tree, Which predicate applies to give first re-solvent Problem title: SLD resolution tree, Which predicate applies to give first re-solvent Tags: unification, prolog, logic-programming Problem: SLD resolution tree, Which predicate applies to give first re-solvent I was thinking I can solve SLD tre...
SLD resolution tree, Which predicate applies to give first re-solvent SLD resolution tree, Which predicate applies to give first re-solvent unification prolog logic-programming SLD Which SLD resolution tree, Which predicate applies to give first re-solvent I was thinking I can solve SLD trees till I found this question...
[ -0.0084228515625, 0.01544189453125, 0.01141357421875, -0.000843048095703125, -0.02392578125, -0.028076171875, -0.003570556640625, -0.00069427490234375, -0.0111083984375, -0.00994873046875, -0.0093994140625, 0.01220703125, -0.00909423828125, -0.007110595703125, 0.01324462890625, 0.02343...
[ 159, 30693, 158839, 53201, 130078, 1653, 2063, 67, 4027, 25720, 8337, 5117, 456, 86918, 660, 51, 41274, 502, 4867, 62775, 28966, 9, 86869, 1360, 1221, 171739, 1733, 50960, 79986, 73342, 51515, 50491, 3115, 202317, 133063, 345, 11249, 40383, ...
[ 0.109130859375, 0.2451171875, 0.2354736328125, 0.22216796875, 0.06329345703125, 0.1673583984375, 0.2025146484375, 0.0849609375, 0.09075927734375, 0.046539306640625, 0.077880859375, 0.1590576171875, 0.1468505859375, 0.164306640625, 0.079345703125, 0.14697265625, 0.096435546875, 0.06...
embed
64717718_c0
64717718
prolog
0
Title: Delete two consecutive constants from a list Problem title: Delete two consecutive constants from a list Tags: prolog Problem: Delete two consecutive constants from a list I have a list and I should to delete consecutive duplicates in the list. So for example: compress([a,a,b,c,c,d,d,d,e], New_List) New_List = [...
Delete two consecutive constants from a list Delete two consecutive constants from a list prolog a Delete New_List Head Rest Head_N Rest_N Delete two consecutive constants from a list I have a list and I should to delete consecutive duplicates in the list. So for example: I have write some code, but when I try I receiv...
[ -0.00738525390625, 0.0194091796875, 0.006500244140625, 0.0228271484375, 0.0081787109375, 0.0218505859375, 0.0045166015625, 0.030517578125, 0.0169677734375, 0.0026397705078125, 0.0045166015625, 0.0185546875, 0.005828857421875, 0.018310546875, -0.009033203125, 0.00109100341796875, 0.01...
[ 262, 46485, 6626, 148390, 13, 53697, 7, 1295, 5303, 502, 4867, 2356, 154663, 44816, 49756, 839, 154109, 171763, 1636, 33022, 18151, 9790, 53299, 98320, 28219, 4568, 31330, 8306, 114689 ]
[ 0.07611083984375, 0.138916015625, 0.18115234375, 0.2178955078125, 0.0797119140625, 0.2213134765625, 0.073486328125, 0.09619140625, 0.1942138671875, 0.0994873046875, 0.1273193359375, 0.040618896484375, 0.1531982421875, 0.1173095703125, 0.10986328125, 0.03570556640625, 0.1805419921875,...
embed
40966848_c0
40966848
prolog
0
Title: Prolog: existence error Problem title: Prolog: existence error Tags: prolog Problem: Prolog: existence error I'm running into an existence error with my prolog code below. Certainly not an expert at prolog, but why is the procedure not being recognized? Any ideas or suggestion would be highly appreciated. Compil...
Prolog: existence error Prolog: existence error prolog Prolog Pepperoni Sausage Bacon Onion Mushroom Prolog: existence error I'm running into an existence error with my prolog code below. Certainly not an expert at prolog, but why is the procedure not being recognized? Any ideas or suggestion would be highly appreciate...
[ -0.0014495849609375, 0.021728515625, -0.0086669921875, 0.0224609375, -0.00531005859375, 0.0224609375, -0.015869140625, 0.01177978515625, 0.0159912109375, -0.008056640625, 0.0029296875, -0.0067138671875, 0.0027618408203125, -0.0167236328125, 0.0220947265625, -0.003753662109375, 0.0136...
[ 1250, 4867, 116311, 18499, 12, 502, 189567, 4370, 947, 147152, 1853, 2271, 2161, 1830, 116971, 28905, 51042, 3934, 142, 18151, 35064, 26808, 15400, 83, 50491, 959, 8035, 125296, 25647, 199015, 77947, 15612, 14, 9433, 706, 3454, 3034, 2424, ...
[ 0.2069091796875, 0.264892578125, 0.2392578125, 0.2398681640625, 0.0178985595703125, 0.18603515625, 0.126220703125, 0.146484375, 0.04248046875, 0.129638671875, 0.063720703125, 0.1068115234375, 0.1134033203125, 0.10101318359375, 0.0836181640625, 0.128662109375, 0.08441162109375, 0.06...
embed
22992926_c0
22992926
prolog
0
Title: Not perfect Prolog code for finding element with some conditions Problem title: Not perfect Prolog code for finding element with some conditions Tags: prolog, list Problem: Not perfect Prolog code for finding element with some conditions First piece of code: count(X, [], 0). count(X, [X|T], N) :- count(X, T, N1)...
Not perfect Prolog code for finding element with some conditions Not perfect Prolog code for finding element with some conditions prolog list Not Prolog Not perfect Prolog code for finding element with some conditions First piece of code: It shows the duplicate times by given element in the list. (There is no problem!)...
[ -0.00579833984375, 0.014892578125, 0.00110626220703125, -0.005096435546875, 0.0013580322265625, 0.0203857421875, -0.00775146484375, 0.0118408203125, 0.00080108642578125, -0.02392578125, -0.0189208984375, -0.01904296875, -0.001800537109375, 0.0027923583984375, 0.00714111328125, -0.00071...
[ 11205, 15787, 1250, 4867, 18151, 90791, 12830, 678, 3060, 27289, 502, 5303, 23972, 63847, 45831, 171763, 67, 20028, 390, 34475, 2967, 77648, 111, 82212, 83, 959, 3293, 14315, 33306, 1650, 44691, 6528, 30022 ]
[ 0.143310546875, 0.2110595703125, 0.1417236328125, 0.2138671875, 0.1912841796875, 0.1357421875, 0.1866455078125, 0.1044921875, 0.06097412109375, 0.2156982421875, 0.1275634765625, 0.1429443359375, 0.038330078125, 0.0574951171875, 0.11669921875, 0.1878662109375, 0.09124755859375, 0.14...
embed
49870172_c1
49870172
prolog
1
P,_),_)). location(P,2,3,building(_,floor(_,_,P),_)). location(P,3,1,building(_,_,floor(P,_,_))). location(P,3,2,building(_,_,floor(_,P,_))). location(P,3,3,building(_,_,floor(_,_,P))). puzzle_soln(BLDG) :- empty_building(BLDG), location(harold,HFN,_,BLDG), location(fred,FFN,FRN,BLDG), location(john,JFN,JRN,BLDG), loca...
P,_),_)). location(P,2,3,building(_,floor(_,_,P),_)). location(P,3,1,building(_,_,floor(P,_,_))). location(P,3,2,building(_,_,floor(_,P,_))). location(P,3,3,building(_,_,floor(_,_,P))). puzzle_soln(BLDG) :- empty_building(BLDG), location(harold,HFN,_,BLDG), location(fred,FFN,FRN,BLDG), location(john,JFN,JRN,BLDG), loca...
[ -0.01171875, 0.007537841796875, -0.00775146484375, 0.0034942626953125, -0.0014801025390625, 0.00286865234375, -0.02294921875, -0.0179443359375, 0.00860595703125, -0.01409912109375, -0.00299072265625, 0.002166748046875, 0.0108642578125, -0.0166015625, -0.0179443359375, 0.005828857421875...
[ 436, 454, 247, 194, 31913, 683, 155761, 146049, 52347, 748, 363, 418, 4, 304, 104192, 8748, 19, 38274, 84324, 15772, 201505, 18345, 66882, 839, 41347, 66159, 18, 50456, 7814, 104105, 820, 343, 38997, 68722, 79035, 3679, 84683, 74070, 106, ...
[ 0.1551513671875, 0.0152130126953125, 0.0076904296875, 0.0438232421875, 0.1907958984375, 0.108154296875, 0.1234130859375, 0.21044921875, 0.0865478515625, 0.022247314453125, 0.0689697265625, 0.001861572265625, 0.00506591796875, 0.004180908203125, 0.27001953125, 0.169189453125, 0.154296...
embed
20250462_c0
20250462
prolog
0
Title: Check if string is substring in Prolog Problem title: Check if string is substring in Prolog Tags: dcg, substring, subsequence, prolog Problem: Check if string is substring in Prolog Is there a way to check if a string is a substring of another string in Prolog? I tried converting the string to a list of chars a...
Check if string is substring in Prolog Check if string is substring in Prolog dcg substring subsequence prolog Check Prolog XLower YLower Char1 Rest1 Char2 Rest2 char_type to_lower Check if string is substring in Prolog Is there a way to check if a string is a substring of another string in Prolog? I tried converting t...
[ 0.0191650390625, -0.0155029296875, 0.007049560546875, 0.0302734375, -0.017578125, 0.011474609375, 0.005615234375, -0.00860595703125, 0.0012359619140625, 0.02099609375, -0.01129150390625, 0.002655029296875, -0.022216796875, -0.0028839111328125, -0.00787353515625, 0.003082275390625, 0....
[ 38679, 2174, 79315, 83, 1614, 91693, 23, 1250, 4867, 177, 184, 502, 43523, 2600, 42, 15363, 6488, 21656, 49756, 304, 21441, 50986, 47, 17336, 56, 12765, 10, 111, 15700, 96760, 5303, 175199, 5117, 5423, 3509, 17932, 18151, 3034, 72272, 306...
[ 0.1358642578125, 0.070556640625, 0.2255859375, 0.0833740234375, 0.2049560546875, 0.237060546875, 0.05694580078125, 0.14111328125, 0.2244873046875, 0.05047607421875, 0.0171051025390625, 0.057098388671875, 0.0216217041015625, 0.0186920166015625, 0.028839111328125, 0.043609619140625, 0....
embed
46153737_c0
46153737
prolog
0
Title: Removing the last occurence of an element from a list in prolog? Problem title: Removing the last occurence of an element from a list in prolog? Tags: prolog Problem: Removing the last occurence of an element from a list in prolog? I am trying to write a program that removes the last occurrence of an element fro...
Removing the last occurence of an element from a list in prolog? Removing the last occurence of an element from a list in prolog? prolog a Removing remove_last Element List Resultlist Removing the last occurence of an element from a list in prolog? I am trying to write a program that removes the last occurrence of an e...
[ 0.00592041015625, 0.0208740234375, 0.0030059814453125, 0.007568359375, -0.01092529296875, 0.00958251953125, -0.00836181640625, 0.0035552978515625, 0.016357421875, -0.01361083984375, 0.007232666015625, -0.01068115234375, -0.006561279296875, 0.005584716796875, 0.00238037109375, -0.007720...
[ 853, 432, 6496, 4568, 74918, 6620, 12830, 1295, 5303, 23, 502, 4867, 87388, 19777, 48325, 32036, 126684, 6562, 31577, 33022, 1528, 7, 42, 1250, 88303, 1653, 2063, 32786, 12477, 4527, 195625, 1830, 35782, 26366, 134598, 59226, 111, 10336, 44...
[ 0.042510986328125, 0.1451416015625, 0.09185791015625, 0.214599609375, 0.181884765625, 0.09857177734375, 0.1998291015625, 0.1319580078125, 0.1922607421875, 0.0830078125, 0.15771484375, 0.242919921875, 0.166015625, 0.212890625, 0.1990966796875, 0.1658935546875, 0.1285400390625, 0.129...
embed
10689032_c1
10689032
prolog
1
). /** are M and F parents of the children in the given list? **/ parents(M,F,[]). parents(M,F,[First|Rest]) :- parents(M,F,First), parents(M,F,Rest). /** are M and F parents? **/ parents(M,F) :- parents(M,F,A), not(A=[]). Now what I get is this: [trace] 3 ?- parents(a,b). Call: (6) parents(a, b) ? creep Call: (7) pare...
). /** are M and F parents of the children in the given list? **/ parents(M,F,[]). parents(M,F,[First|Rest]) :- parents(M,F,First), parents(M,F,Rest). /** are M and F parents? **/ parents(M,F) :- parents(M,F,A), not(A=[]). Now what I get is this: [trace] 3 ?- parents(a,b). Call: (6) parents(a, b) ? creep Call: (7) pare...
[ 0.0152587890625, -0.00151824951171875, 0.013916015625, 0.005096435546875, -0.01251220703125, 0.0064697265625, 0.005096435546875, -0.005096435546875, 0.0181884765625, -0.00787353515625, 0.00762939453125, -0.005462646484375, -0.0123291015625, 0.0106201171875, 0.017822265625, -0.012573242...
[ 194, 621, 276, 136, 563, 27863, 111, 70, 20020, 23, 34475, 5303, 64, 594, 919, 207263, 58745, 1052, 525, 15772, 959, 14240, 2046, 903, 39989, 268, 138, 705, 9, 4, 275, 26265, 6791, 876, 49512, 254, 8696, 758, 65283, 5443, 190355, 6591...
[ 0.070068359375, 0.092529296875, 0.1107177734375, 0.10040283203125, 0.13623046875, 0.23779296875, 0.0274810791015625, 0.035888671875, 0.2041015625, 0.02923583984375, 0.06060791015625, 0.205322265625, 0.023162841796875, 0.09576416015625, 0.1282958984375, 0.125732421875, 0.0310821533203...
embed
70302692_c0
70302692
prolog
0
Title: How to program a list in prolog that has n number of elements Problem title: How to program a list in prolog that has n number of elements Tags: prolog Problem: How to program a list in prolog that has n number of elements I'm trying to code a program in prolog, that returns true only if the list contains first ...
How to program a list in prolog that has n number of elements How to program a list in prolog that has n number of elements prolog How langage11 How to program a list in prolog that has n number of elements I'm trying to code a program in prolog, that returns true only if the list contains first of all only the letters...
[ 0.01220703125, -0.00274658203125, -0.00156402587890625, 0.0296630859375, 0.000823974609375, 0.01275634765625, -0.004852294921875, 0.007415771484375, 0.0224609375, -0.025390625, 0.00506591796875, -0.01373291015625, -0.0026092529296875, 0.01123046875, 0.00579833984375, -0.0052490234375, ...
[ 11249, 47, 1528, 5303, 23, 502, 4867, 450, 1556, 653, 14012, 111, 80854, 1937, 4588, 1662, 10, 31577, 18151, 30646, 29568, 4734, 2174, 70541, 5117, 756, 120820, 275, 238, 8110, 24763, 5701, 41170, 501, 903, 12989, 89536, 98320, 37842, 296...
[ 0.08319091796875, 0.0234527587890625, 0.2435302734375, 0.2425537109375, 0.0897216796875, 0.218017578125, 0.27197265625, 0.0277252197265625, 0.09173583984375, 0.1630859375, 0.197265625, 0.00787353515625, 0.238037109375, 0.155517578125, 0.1409912109375, 0.19384765625, 0.03802490234375,...
embed
45771912_c0
45771912
prolog
0
Title: Prolog counting max distance of not negative sum in 2 lists Problem title: Prolog counting max distance of not negative sum in 2 lists Tags: prolog, instantiation-error Problem: Prolog counting max distance of not negative sum in 2 lists what i want to find is the maximum J-I (in terms of arrays) where the eleme...
Prolog counting max distance of not negative sum in 2 lists Prolog counting max distance of not negative sum in 2 lists prolog instantiation-error Prolog Hd1 Tl1 Hd2 Tl2 Dist J1-I1 ERROR Arguments Prolog counting max distance of not negative sum in 2 lists what i want to find is the maximum J-I (in terms of arrays) whe...
[ 0.005767822265625, 0.00885009765625, 0.01153564453125, 0.01446533203125, -0.00130462646484375, 0.0242919921875, 0.0035552978515625, 0.0235595703125, 0.01129150390625, -0.0225830078125, -0.00579833984375, -0.004852294921875, 0.01434326171875, 0.006561279296875, 0.01080322265625, -0.0114...
[ 1250, 4867, 54529, 18389, 62488, 959, 40907, 10554, 116, 5303, 502, 34648, 14, 188800, 82854, 418, 304, 6206, 18, 821, 20268, 568, 151206, 24638, 112140, 23, 3444, 7413, 38132, 9, 10298, 12830, 167785, 17932, 60212, 2967, 53418, 444, 82424,...
[ 0.1483154296875, 0.22998046875, 0.1602783203125, 0.1832275390625, 0.246337890625, 0.149169921875, 0.191650390625, 0.1656494140625, 0.13671875, 0.2171630859375, 0.1226806640625, 0.080322265625, 0.1070556640625, 0.1602783203125, 0.0662841796875, 0.016876220703125, 0.0631103515625, 0....
embed
2823481_c0
2823481
prolog
0
Title: prolog list manipulating Problem title: prolog list manipulating Tags: prolog, artificial-intelligence Problem: prolog list manipulating I have the following code which basically needs to add a list as an item to a greater list. So NewBoardsList should contain all the boards generated in the moves_generate_board...
prolog list manipulating prolog list manipulating prolog artificial-intelligence Colour Board NewBoardsList other_colour OtherColour threaten_by Options moves_generate_board BoardsList List NewBoard prolog list manipulating I have the following code which basically needs to add a list as an item to a greater list. So N...
[ 0.014404296875, 0.00482177734375, -0.00677490234375, -0.00138092041015625, -0.006805419921875, 0.0169677734375, -0.016357421875, 0.0146484375, 0.019775390625, -0.036865234375, 0.002105712890625, 0.0155029296875, 0.01190185546875, 0.00762939453125, -0.0012664794921875, -0.0064697265625,...
[ 502, 4867, 5303, 45258, 1916, 66733, 130687, 196431, 62554, 2356, 12647, 99397, 154663, 3789, 22796, 64511, 78457, 34639, 120332, 33, 152448, 25813, 48281, 24351, 32036, 5861, 25632, 18151, 27117, 15190, 35735, 117396, 70541, 756, 45443, 139392, ...
[ 0.1259765625, 0.240966796875, 0.197021484375, 0.17578125, 0.02764892578125, 0.108154296875, 0.1168212890625, 0.1544189453125, 0.1934814453125, 0.076904296875, 0.1258544921875, 0.11328125, 0.1895751953125, 0.02288818359375, 0.05181884765625, 0.027618408203125, 0.0535888671875, 0.062...
embed
54337833_c1
54337833
prolog
1
,2],[spanish, blue,4]] Output: [[spanish, white, 5], [italian, red,4], [canadian, blue,2]] Explanation: let's look at [spanish, white, 5] . We know that spanish also located in [spanish, blue,4] , but blue is located also in [canadian, blue,2] . canadian is not located anywhere else so blue belongs to canadian . That m...
,2],[spanish, blue,4]] Output: [[spanish, white, 5], [italian, red,4], [canadian, blue,2]] Explanation: let's look at [spanish, white, 5] . We know that spanish also located in [spanish, blue,4] , but blue is located also in [canadian, blue,2] . canadian is not located anywhere else so blue belongs to canadian . That m...
[ -0.0016326904296875, 0.0186767578125, -0.00799560546875, 0.0252685546875, -0.01177978515625, 0.01031494140625, -0.0096435546875, 0.004730224609375, -0.00714111328125, -0.007171630859375, 0.0001430511474609375, -0.0167236328125, 0.0035247802734375, 0.006256103515625, -0.016845703125, 0....
[ 6, 4, 90173, 19332, 4745, 57571, 617, 13538, 7077, 35011, 190, 89597, 4842, 31519, 27201, 5868, 6713, 3714, 27734, 105866, 23, 83, 831, 11, 959, 151107, 10617, 47, 62163, 116, 26950, 111880, 201, 7413, 5584, 36272, 12319, 5045, 4677, 136,...
[ 0.011383056640625, 0.0196990966796875, 0.158447265625, 0.178955078125, 0.182861328125, 0.2308349609375, 0.158447265625, 0.126220703125, 0.1015625, 0.2005615234375, 0.1427001953125, 0.1676025390625, 0.11572265625, 0.10003662109375, 0.1624755859375, 0.054595947265625, 0.042724609375, ...
embed
74974326_c0
74974326
prolog
0
Title: Confused about recursive counters in Prolog Problem title: Confused about recursive counters in Prolog Tags: prolog Problem: Confused about recursive counters in Prolog I have been stuck on this problem for a couple of days. So given a balanced tree of the form t(Tree, Value, Tree), I want to find the depth of t...
Confused about recursive counters in Prolog Confused about recursive counters in Prolog prolog Confused Prolog Tree1 element_at Confused about recursive counters in Prolog I have been stuck on this problem for a couple of days. So given a balanced tree of the form t(Tree, Value, Tree), I want to find the depth of the l...
[ 0.0263671875, 0.01055908203125, 0.01025390625, 0.00003743171691894531, 0.01513671875, 0.01513671875, 0.001556396484375, 0.01043701171875, 0.01422119140625, -0.0546875, -0.00016021728515625, -0.0194091796875, 0.0198974609375, 0.01953125, 0.044921875, -0.00628662109375, 0.015380859375,...
[ 106161, 33740, 195625, 5844, 105416, 7, 1250, 4867, 502, 101344, 418, 12830, 257, 179933, 40197, 53201, 3173, 808, 62731, 190060, 7413, 168867, 25737, 18151, 43240, 4552, 55681, 15400, 831, 3884, 36917, 11782, 187, 6261, 541, 83, 20, 106, 6...
[ 0.082763671875, 0.05633544921875, 0.2215576171875, 0.1429443359375, 0.276611328125, 0.052581787109375, 0.1380615234375, 0.2335205078125, 0.09521484375, 0.18798828125, 0.08978271484375, 0.164306640625, 0.123046875, 0.001800537109375, 0.1739501953125, 0.1943359375, 0.0269927978515625, ...
embed
65511714_c1
65511714
prolog
1
phrase(before(14,10,2), Ls). % rule for all the elements to be less than 60. lt60_(X) :- X #=< 60. lt60(Ls) :- maplist(lt60_, Ls). % available operations add5([L0|Rs], L) :- X #= L0+5, L = [X, L0|Rs]. add7([L0|Rs], L) :- X #= L0+7, L = [X, L0|Rs]. root([L0|Rs], L) :- isqrt(L0, X), L = [X, L0|Rs]. % base case, the game...
phrase(before(14,10,2), Ls). % rule for all the elements to be less than 60. lt60_(X) :- X #=< 60. lt60(Ls) :- maplist(lt60_, Ls). % available operations add5([L0|Rs], L) :- X #= L0+5, L = [X, L0|Rs]. add7([L0|Rs], L) :- X #= L0+7, L = [X, L0|Rs]. root([L0|Rs], L) :- isqrt(L0, X), L = [X, L0|Rs]. % base case, the game...
[ 0.0004444122314453125, 0.010009765625, 0.0081787109375, 0.0093994140625, 0.01336669921875, 0.0106201171875, -0.0023040771484375, -0.0306396484375, 0.0166015625, -0.04736328125, 0.004547119140625, 0.0155029296875, -0.0023345947265625, 0.000537872314453125, 0.0013885498046875, -0.0007019...
[ 113860, 372, 89700, 2592, 963, 10461, 339, 7, 1745, 79986, 756, 80854, 40715, 3501, 1496, 96, 18, 4598, 1542, 1193, 16093, 866, 22288, 6562, 1277, 19882, 41018, 15190, 758, 2389, 1052, 131815, 966, 1328, 74855, 3198, 3647, 7225, 6712, 727...
[ 0.25927734375, 0.021728515625, 0.1728515625, 0.166015625, 0.1611328125, 0.0950927734375, 0.1182861328125, 0.050262451171875, 0.050262451171875, 0.1761474609375, 0.0736083984375, 0.173095703125, 0.123291015625, 0.005584716796875, 0.1982421875, 0.0107421875, 0.03338623046875, 0.23010...
embed
30224582_c0
30224582
prolog
0
Title: Prolog - simplify derivative Problem title: Prolog - simplify derivative Tags: prolog-defaulty, prolog, simplify Problem: Prolog - simplify derivative so I just got started with Prolog this semester, and got the homework to implement a pretty basic d(function, variable, derivative) which I did like this: d(X,X,1...
Prolog - simplify derivative Prolog - simplify derivative prolog-defaulty prolog simplify Prolog E-1 U-V A-B V-U Prolog - simplify derivative so I just got started with Prolog this semester, and got the homework to implement a pretty basic d(function, variable, derivative) which I did like this: I know this is not comp...
[ 0.02587890625, 0.0111083984375, 0.0179443359375, 0.004302978515625, 0.0135498046875, 0.0091552734375, -0.000125885009765625, -0.0079345703125, 0.02783203125, -0.0198974609375, -0.00482177734375, -0.0009765625, -0.00390625, -0.006256103515625, -0.0150146484375, 0.0020904541015625, -0....
[ 1250, 4867, 112892, 18929, 30057, 4935, 502, 214810, 53, 241, 5759, 345, 856, 62, 9, 571, 310, 1062, 26859, 49345, 5368, 18244, 29479, 28875, 62822, 104, 137175, 77336, 1884, 903, 3714, 959, 28484, 29256, 756, 66211, 56065, 81979, 33306, ...
[ 0.1966552734375, 0.274169921875, 0.227294921875, 0.16162109375, 0.224853515625, 0.144775390625, 0.156982421875, 0.2027587890625, 0.0626220703125, 0.08056640625, 0.1112060546875, 0.047454833984375, 0.1883544921875, 0.02777099609375, 0.00677490234375, 0.0648193359375, 0.1177978515625, ...
embed
36236715_c0
36236715
prolog
0
Title: Prolog grammar productions Problem title: Prolog grammar productions Tags: prolog, dcg Problem: Prolog grammar productions I am trying to learn how to write production rules in prolog. This is what I have. paragraph --> sentence, paragraph ; []. sentence --> proper_noun, [ ], verb, [ ], preposition, [ ], article...
Prolog grammar productions Prolog grammar productions prolog dcg Prolog proper_noun Jimmy Yancy Clementine Astrid atom_codes Output Prolog grammar productions I am trying to learn how to write production rules in prolog. This is what I have. I tried to call it using It returned false as an output. Please help me unders...
[ 0.010986328125, 0.0167236328125, 0.00107574462890625, 0.0390625, -0.0079345703125, 0.0184326171875, 0.0002269744873046875, -0.00897216796875, -0.0022735595703125, -0.0194091796875, 0.00017833709716796875, -0.009033203125, -0.013671875, 0.01055908203125, 0.017578125, 0.01165771484375, ...
[ 1250, 4867, 122092, 147, 36049, 7, 502, 104, 238, 177, 27798, 157, 309, 113417, 25970, 2408, 151196, 1212, 172332, 34627, 40899, 13538, 7077, 31577, 30698, 3642, 33022, 91736, 23, 765, 37842, 11782, 442, 17368, 1650, 176377, 98320, 237, 140...
[ 0.19775390625, 0.3037109375, 0.1524658203125, 0.111328125, 0.207763671875, 0.0135498046875, 0.1475830078125, 0.025299072265625, 0.047210693359375, 0.1026611328125, 0.1575927734375, 0.08892822265625, 0.098388671875, 0.18701171875, 0.1173095703125, 0.137451171875, 0.1402587890625, 0....
embed
61147182_c0
61147182
prolog
0
Title: Define a relation first_last(L1, L2) which takes a list L1 and returns a list L2 containing the first three and last three elements of L1 Problem title: Define a relation first_last(L1, L2) which takes a list L1 and returns a list L2 containing the first three and last three elements of L1 Tags: prolog Problem: ...
Define a relation first_last(L1, L2) which takes a list L1 and returns a list L2 containing the first three and last three elements of L1 Define a relation first_last(L1, L2) which takes a list L1 and returns a list L2 containing the first three and last three elements of L1 prolog Define first_last Define a relation f...
[ 0.008544921875, 0.0067138671875, 0.0003948211669921875, -0.01385498046875, -0.00107574462890625, -0.0068359375, -0.0142822265625, 0.006072998046875, 0.0269775390625, -0.02587890625, 0.00946044921875, -0.00860595703125, -0.00007295608520507812, 0.006988525390625, 0.0198974609375, 0.0134...
[ 262, 64552, 41911, 5117, 454, 19777, 866, 418, 339, 10461, 51776, 5303, 30646, 304, 70541, 17262, 136, 4568, 80854, 10, 4, 502, 4867, 203251, 20949, 33478, 25842, 1556, 2809, 133, 3714, 1884, 903, 284, 335, 313, 4358, 2046, 444, 64557, ...
[ 0.0211029052734375, 0.1690673828125, 0.2213134765625, 0.1817626953125, 0.0992431640625, 0.27978515625, 0.13671875, 0.149658203125, 0.1461181640625, 0.2294921875, 0.06396484375, 0.1409912109375, 0.12060546875, 0.180908203125, 0.04986572265625, 0.1883544921875, 0.043487548828125, 0.1...
embed
20038838_c0
20038838
prolog
0
Title: Test lists to see if they are a prefix or suffix of another list Problem title: Test lists to see if they are a prefix or suffix of another list Tags: dcg, list, prefix, prolog Problem: Test lists to see if they are a prefix or suffix of another list I'm stuck on a problem. I was wondering if I could get some he...
Test lists to see if they are a prefix or suffix of another list Test lists to see if they are a prefix or suffix of another list dcg list prefix prolog Test Suffix Test lists to see if they are a prefix or suffix of another list I'm stuck on a problem. I was wondering if I could get some help. What I have so far How d...
[ 0.01361083984375, 0.00144195556640625, 0.0021209716796875, 0.01153564453125, -0.026123046875, -0.0164794921875, 0.0034637451171875, 0.00726318359375, 0.0194091796875, 0.0120849609375, -0.0137939453125, -0.01263427734375, -0.021240234375, -0.000339508056640625, 0.0084228515625, 0.004455...
[ 8647, 5303, 47, 1957, 2174, 621, 183114, 707, 133784, 425, 15700, 7, 10, 177, 502, 4867, 142830, 55923, 111, 179933, 2967, 149016, 4358, 2060, 2046, 4488, 51515, 44691 ]
[ 0.1956787109375, 0.2064208984375, 0.039794921875, 0.1038818359375, 0.064453125, 0.05633544921875, 0.2470703125, 0.0692138671875, 0.187255859375, 0.1214599609375, 0.05780029296875, 0.001800537109375, 0.0247344970703125, 0.051025390625, 0.050537109375, 0.1292724609375, 0.1090087890625,...
embed
23878303_c0
23878303
prolog
0
Title: Cryptarithmetic puzzle Prolog Problem title: Cryptarithmetic puzzle Prolog Tags: cryptarithmetic-puzzle, prolog Problem: Cryptarithmetic puzzle Prolog I have the following task in Prolog: Find an assignment of the letters to digits (each letter to a different digit) so that the following product holds: EAU * EAU...
Cryptarithmetic puzzle Prolog Cryptarithmetic puzzle Prolog cryptarithmetic-puzzle prolog Cryptarithmetic Prolog use_module all_different EAU OCEAN Cryptarithmetic puzzle Prolog I have the following task in Prolog: Find an assignment of the letters to digits (each letter to a different digit) so that the following prod...
[ -0.00160980224609375, -0.0169677734375, -0.0194091796875, 0.0260009765625, -0.006317138671875, 0.01239013671875, -0.01708984375, -0.00122833251953125, -0.0003032684326171875, -0.003692626953125, -0.01373291015625, -0.0081787109375, 0.021728515625, 0.01470947265625, -0.007049560546875, ...
[ 239159, 8962, 104192, 1250, 4867, 136791, 1766, 13894, 502, 4527, 83279, 756, 238778, 241, 20000, 91888, 105621, 25632, 66211, 23, 26040, 95486, 120820, 47, 153939, 41581, 31330, 12921, 221, 12996, 16401, 661, 2203, 18151, 28960, 4171, 22936, ...
[ 0.1572265625, 0.090087890625, 0.1668701171875, 0.1632080078125, 0.25244140625, 0.119384765625, 0.029083251953125, 0.05517578125, 0.0640869140625, 0.0169219970703125, 0.066162109375, 0.042999267578125, 0.1771240234375, 0.0897216796875, 0.239013671875, 0.1690673828125, 0.2177734375, ...
embed
29896538_c0
29896538
prolog
0
Title: Prolog. How to print a matrix according to a dynamic predicate? Problem title: Prolog. How to print a matrix according to a dynamic predicate? Tags: prolog Problem: Prolog. How to print a matrix according to a dynamic predicate? I have the next matrix: map(1,[[2,0,0,0,0,0,0,0,0,0], [3,2,0,0,2,2,0,0,0,0], [0,2,0,...
Prolog. How to print a matrix according to a dynamic predicate? Prolog. How to print a matrix according to a dynamic predicate? prolog Prolog How Prolog. How to print a matrix according to a dynamic predicate? I have the next matrix: and a dynamic predicate: and this "function" which print the matrix: I want to print t...
[ 0.0079345703125, -0.005615234375, 0.02734375, 0.008056640625, -0.007293701171875, 0.012451171875, -0.00531005859375, 0.0263671875, -0.01055908203125, -0.0206298828125, -0.0047607421875, -0.0087890625, -0.01116943359375, -0.0250244140625, -0.0096435546875, 0.0157470703125, 0.015319824...
[ 1250, 4867, 11249, 47, 28412, 50944, 425, 59499, 84079, 1653, 2063, 67, 502, 10, 11737, 137175, 3444, 36997, 12477, 27289, 2174, 1542, 1723, 29568, 856, 50770, 12830, 98320, 2306, 4358 ]
[ 0.1466064453125, 0.223388671875, 0.08306884765625, 0.057464599609375, 0.236083984375, 0.2066650390625, 0.1441650390625, 0.146728515625, 0.217529296875, 0.1683349609375, 0.1904296875, 0.07928466796875, 0.08343505859375, 0.001129150390625, 0.09521484375, 0.134033203125, 0.0618896484375...
embed
20216868_c1
20216868
prolog
1
1],Listwall)), !. % gives a random number choose(A, C, B) :- repeat, B is random(A), B \= C, !. %count the number of pellets above the coordinate (0,0). count_pellets_above([],0). count_pellets_above([[_,Y]|T],N) :- Y>=0, count_pellets_above(T,M), N is M+1, !. count_pellets_above([[_,Y]|T],N) :- Y<0, count_pellets_abov...
1],Listwall)), !. % gives a random number choose(A, C, B) :- repeat, B is random(A), B \= C, !. %count the number of pellets above the coordinate (0,0). count_pellets_above([],0). count_pellets_above([[_,Y]|T],N) :- Y>=0, count_pellets_above(T,M), N is M+1, !. count_pellets_above([[_,Y]|T],N) :- Y<0, count_pellets_abov...
[ -0.00299072265625, 0.00396728515625, 0.00091552734375, 0.0162353515625, -0.011962890625, 0.019775390625, 0.0019683837890625, 0.0126953125, 0.0191650390625, 0.001708984375, -0.0126953125, -0.0023345947265625, -0.002197265625, 0.00154876708984375, 0.004364013671875, -0.016357421875, 0....
[ 106, 268, 154663, 66769, 711, 1745, 76199, 96759, 14012, 55076, 284, 313, 335, 15772, 119140, 71013, 43874, 933, 36917, 176866, 63527, 54529, 117515, 7831, 21552, 77495, 1723, 618, 839, 990, 145407, 594, 541, 276, 21748, 41566, 83, 3444, 37...
[ 0.05218505859375, 0.00885009765625, 0.1514892578125, 0.189208984375, 0.03155517578125, 0.119873046875, 0.0634765625, 0.201416015625, 0.1771240234375, 0.134033203125, 0.006988525390625, 0.0545654296875, 0.0814208984375, 0.000579833984375, 0.16357421875, 0.153076171875, 0.193603515625,...
embed
26326038_c0
26326038
prolog
0
Title: List position in Prolog Problem title: List position in Prolog Tags: prolog Problem: List position in Prolog I am trying to write a predicate that follows some simple conditions. It should take 2 lists and 2 variables and should return true if the first variable is located at the same position in the first list ...
List position in Prolog List position in Prolog prolog List Prolog Var1 Var2 List position in Prolog I am trying to write a predicate that follows some simple conditions. It should take 2 lists and 2 variables and should return true if the first variable is located at the same position in the first list as the second v...
[ 0.00433349609375, 0.00732421875, 0.01251220703125, -0.000530242919921875, -0.01177978515625, 0.022216796875, -0.000743865966796875, 0.022705078125, 0.0123291015625, -0.011962890625, 0.01361083984375, 0.0166015625, 0.01611328125, 0.005615234375, -0.010986328125, 0.0023040771484375, 0....
[ 32036, 19069, 1250, 4867, 23, 502, 3323, 418, 304, 31577, 33022, 1653, 2063, 67, 28960, 8781, 27289, 5646, 116, 5303, 77336, 30646, 29568, 5117, 105866, 5701, 17932, 237875, 20697, 12765, 10588, 27781, 1884, 37842, 98320, 4488, 22027, 18 ]
[ 0.2281494140625, 0.2171630859375, 0.1588134765625, 0.2305908203125, 0.0313720703125, 0.118896484375, 0.162353515625, 0.046875, 0.0953369140625, 0.0411376953125, 0.119140625, 0.13720703125, 0.1767578125, 0.072021484375, 0.00982666015625, 0.041778564453125, 0.095703125, 0.05560302734...
embed
29746018_c0
29746018
prolog
0
Title: Problems while invoking swi-prolog from PHP Problem title: Problems while invoking swi-prolog from PHP Tags: swi-prolog, php, prolog Problem: Problems while invoking swi-prolog from PHP I'm trying to execute a swi-prolog file from PHP, but when i try to run this code, nothing is executed. This my code: <HTML> <H...
Problems while invoking swi-prolog from PHP Problems while invoking swi-prolog from PHP swi-prolog php prolog PHP Problems HTML HEAD TITLE Calling SWI-Prolog n15 Program Files swipl-win.exe test.pl PRE print_r shell_exec Problems while invoking swi-prolog from PHP I'm trying to execute a swi-prolog file from PHP, but w...
[ 0.0142822265625, 0.006072998046875, 0.0093994140625, 0.0108642578125, -0.0234375, 0.007568359375, 0.01116943359375, -0.014892578125, -0.00677490234375, -0.053955078125, 0.0198974609375, 0.046875, -0.023681640625, 0.0225830078125, -0.00096893310546875, 0.01043701171875, 0.02880859375,...
[ 15649, 12960, 23, 23253, 91, 2452, 9, 3454, 4867, 1295, 47302, 214, 3958, 502, 19097, 188328, 131514, 26265, 159, 38969, 10752, 653, 1837, 7663, 42724, 2424, 9494, 46480, 3034, 23096, 28412, 42, 128019, 31577, 71924, 11435, 1284, 9790, 1167...
[ 0.183837890625, 0.07598876953125, 0.04498291015625, 0.1708984375, 0.09423828125, 0.244873046875, 0.050323486328125, 0.174560546875, 0.2254638671875, 0.1275634765625, 0.250732421875, 0.05120849609375, 0.212646484375, 0.159912109375, 0.123779296875, 0.0582275390625, 0.044036865234375, ...
embed
33989807_c0
33989807
prolog
0
Title: Prolog Rules in example Problem title: Prolog Rules in example Tags: prolog Problem: Prolog Rules in example I have a database in Prolog like this: connection(a,b,bus) connection(b,c,metro) connection(b,d,taxi) connection(d,e,bus) What I want is the rules I need to apply so I can ask the question: "transport(a,c...
Prolog Rules in example Prolog Rules in example prolog Prolog Rules Departure Arrive Transport Transport1 Arrival Transport2 Prolog Rules in example I have a database in Prolog like this: What I want is the rules I need to apply so I can ask the question: "transport(a,c)" and it answers: "bus" and "metro" Is that possi...
[ 0.0223388671875, 0.0087890625, -0.003662109375, 0.020263671875, -0.0050048828125, 0.00040435791015625, -0.0240478515625, -0.007568359375, 0.0111083984375, -0.0546875, -0.003997802734375, -0.0198974609375, -0.018310546875, 0.00506591796875, -0.010986328125, 0.009521484375, 0.022583007...
[ 1250, 4867, 139118, 7, 23, 27781, 502, 262, 2500, 6644, 64986, 272, 20913, 205545, 141, 304, 63399, 1884, 3444, 91736, 3871, 59911, 26458, 9655, 72903, 11, 238, 136, 35166, 4223, 37165, 7722, 61924, 106, 707, 116, 41, 1294, 4, 43240, 19...
[ 0.1685791015625, 0.271240234375, 0.2080078125, 0.037628173828125, 0.0248870849609375, 0.24609375, 0.121337890625, 0.07330322265625, 0.1572265625, 0.04852294921875, 0.1513671875, 0.07635498046875, 0.209716796875, 0.1304931640625, 0.03472900390625, 0.052947998046875, 0.1680908203125, ...
embed
19123611_c0
19123611
prolog
0
Title: Prolog: Pass User-Input as Parameters Problem title: Prolog: Pass User-Input as Parameters Tags: io, prolog Problem: Prolog: Pass User-Input as Parameters I am new to Prolog and therefore need help with the following task. I have the programm: do(save) :- save_bal(bad). do(act) :- save_bal(good), inc(good). do(c...
Prolog: Pass User-Input as Parameters Prolog: Pass User-Input as Parameters io prolog Prolog Pass User-Input Parameters save_bal Min MinE Prolog: Pass User-Input as Parameters I am new to Prolog and therefore need help with the following task. I have the programm: My task is to rewrite this programm, so the numbers 300...
[ -0.00640869140625, -0.00958251953125, 0.004730224609375, -0.00118255615234375, -0.00909423828125, 0.0361328125, 0.000972747802734375, 0.00543212890625, 0.024169921875, -0.0247802734375, 0.0067138671875, -0.014892578125, -0.012451171875, -0.00060272216796875, 0.02783203125, -0.009826660...
[ 1250, 4867, 12, 28872, 53400, 4153, 7077, 237, 1720, 29089, 22995, 502, 30098, 3571, 4211, 647, 444, 3525, 47, 127298, 3871, 4358, 25632, 66211, 765, 28966, 456, 434, 18781, 903, 4, 221, 70, 101935, 138, 28568, 305, 136, 201, 5423, 390,...
[ 0.2216796875, 0.288818359375, 0.0195465087890625, 0.1866455078125, 0.2279052734375, 0.166259765625, 0.1875, 0.113037109375, 0.1671142578125, 0.2142333984375, 0.1651611328125, 0.1611328125, 0.141357421875, 0.171630859375, 0.1427001953125, 0.07574462890625, 0.009124755859375, 0.11718...
embed
76084814_c1
76084814
prolog
1
_),D) :- color(D). rule(x,x,o,r(_,_,_,_,E,_,_),E) :- color(E). rule(o,x,x,r(_,_,_,_,_,F,_),F) :- color(F). rule(x,x,x,r(_,_,_,_,_,_,G),G) :- color(G). %Creates a list of lists of triplets form a list given triplets(List, Triplets) :- triplets_helper([o|List], Triplets). % insert null at beginning triplets_helper([X1,X2...
_),D) :- color(D). rule(x,x,o,r(_,_,_,_,E,_,_),E) :- color(E). rule(o,x,x,r(_,_,_,_,_,F,_),F) :- color(F). rule(x,x,x,r(_,_,_,_,_,_,G),G) :- color(G). %Creates a list of lists of triplets form a list given triplets(List, Triplets) :- triplets_helper([o|List], Triplets). % insert null at beginning triplets_helper([X1,X2...
[ -0.00162506103515625, -0.003875732421875, 0.0096435546875, 0.0032196044921875, -0.012451171875, 0.009765625, -0.023681640625, 0.003692626953125, 0.01287841796875, -0.0064697265625, -0.0036163330078125, -0.004791259765625, 0.0022430419921875, -0.001495361328125, -0.00347900390625, 0.022...
[ 101, 247, 397, 16, 15772, 10576, 79986, 425, 31, 42, 647, 919, 724, 1745, 63784, 63614, 10, 5303, 111, 162738, 933, 3173, 34475, 154663, 55903, 1974, 73866, 56, 183540, 56574, 99, 86595, 1542, 418, 90173, 304, 711, 3564, 363, 1723, 990,...
[ 0.04168701171875, 0.0469970703125, 0.073974609375, 0.003448486328125, 0.05255126953125, 0.154296875, 0.1865234375, 0.06591796875, 0.12255859375, 0.045867919921875, 0.0545654296875, 0.0966796875, 0.0372314453125, 0.04193115234375, 0.1396484375, 0.023040771484375, 0.0197601318359375, ...
embed
1768274_c0
1768274
prolog
0
Title: Prolog : Learning by example Problem title: Prolog : Learning by example Tags: clpfd, prolog Problem: Prolog : Learning by example I am trying to learn a little bit about swi-prolog (beyond the basic, useless programs). Can anyone explain (perhaps in pseudocode) what this sudoku solver and the related functions ...
Prolog : Learning by example Prolog : Learning by example clpfd prolog Prolog Learning use_module Rows length_ all_distinct Columns Bs1 Bs2 Bs3 Prolog : Learning by example I am trying to learn a little bit about swi-prolog (beyond the basic, useless programs). Can anyone explain (perhaps in pseudocode) what this sudok...
[ 0.0167236328125, 0.0203857421875, 0.0167236328125, 0.0023956298828125, -0.0091552734375, -0.0030975341796875, 0.0206298828125, -0.001708984375, 0.0072021484375, -0.050537109375, -0.001922607421875, -0.0322265625, -0.0004119873046875, 0.0155029296875, -0.0283203125, 0.01129150390625, ...
[ 1250, 4867, 152, 114344, 390, 27781, 33139, 39557, 71, 502, 4527, 83279, 96190, 140909, 756, 38893, 233987, 335, 304, 363, 31577, 30698, 10176, 4785, 1672, 91, 2452, 9, 3454, 62822, 9393, 103391, 4171, 35672, 73342, 74189, 40899, 2367, 903,...
[ 0.1767578125, 0.27001953125, 0.0236968994140625, 0.169677734375, 0.07769775390625, 0.231689453125, 0.005859375, 0.0289306640625, 0.091796875, 0.1253662109375, 0.118896484375, 0.1417236328125, 0.1829833984375, 0.12890625, 0.03033447265625, 0.09478759765625, 0.1920166015625, 0.003631...
embed
317740_c0
317740
prolog
0
Title: prolog recursively find largest node Problem title: prolog recursively find largest node Tags: binary-tree, prolog Problem: prolog recursively find largest node Just a simple binary tree and i want to find the the largest node. example tree: t(t(t(nil,1,nil),2,t(nil,3,nil)),4,t(t(t(nil,8,nil),5,nil),6,t(nil,7,ni...
prolog recursively find largest node prolog recursively find largest node binary-tree prolog t.root tree.root Root Max LValue RValue prolog recursively find largest node Just a simple binary tree and i want to find the the largest node. example tree: t(t(t(nil,1,nil),2,t(nil,3,nil)),4,t(t(t(nil,8,nil),5,nil),6,t(nil,7,...
[ 0.0233154296875, 0.019775390625, 0.00823974609375, -0.000652313232421875, 0.00921630859375, 0.02490234375, -0.017333984375, 0.00096893310546875, 0.006500244140625, -0.05615234375, -0.0069580078125, -0.0019989013671875, 0.006744384765625, -0.01055908203125, 0.047607421875, -0.0108032226...
[ 502, 4867, 195625, 5844, 7413, 142105, 110, 112, 538, 2394, 6635, 62600, 808, 148920, 53201, 150948, 9920, 46233, 50770, 8781, 3444, 70, 27781, 18, 17324, 304, 363, 617, 1019, 758, 910, 966, 45767, 10336, 59911, 44116, 12638, 13319, 28219, ...
[ 0.170166015625, 0.235595703125, 0.2183837890625, 0.147705078125, 0.139404296875, 0.238037109375, 0.1988525390625, 0.1778564453125, 0.00213623046875, 0.133544921875, 0.0782470703125, 0.1883544921875, 0.08837890625, 0.148193359375, 0.2021484375, 0.19677734375, 0.1795654296875, 0.0863...
embed
1875583_c0
1875583
prolog
0
Title: Prolog difference routine Problem title: Prolog difference routine Tags: logic, prolog Problem: Prolog difference routine I need some help with a routine that I am trying to create. I need to make a routine that will look something like this: difference([(a,b),(a,c),(b,c),(d,e)],[(a,_)],X). X = [(b,c),(d,e)]. I ...
Prolog difference routine Prolog difference routine logic prolog Prolog Prolog difference routine I need some help with a routine that I am trying to create. I need to make a routine that will look something like this: I really need help on this one.. I have written a method so far that can remove the first occurrence ...
[ 0.01190185546875, 0.01080322265625, 0.01483154296875, 0.01324462890625, -0.0159912109375, 0.00494384765625, -0.0155029296875, 0.0228271484375, 0.00433349609375, -0.0213623046875, 0.00323486328125, 0.0020751953125, -0.000545501708984375, 0.0162353515625, 0.0089111328125, 0.0098876953125...
[ 1250, 4867, 60212, 124374, 62775, 502, 3871, 3060, 4358, 10, 31577, 28282, 3249, 6713, 9844, 1884, 903, 6183, 1632, 59121, 55300, 2060, 831, 87388, 5117, 74918, 42, 6620, 7413, 49903, 756, 69098, 39958, 18151, 5303, 214, 22144, 39989, 28219...
[ 0.1656494140625, 0.24365234375, 0.233642578125, 0.272705078125, 0.156982421875, 0.1417236328125, 0.10693359375, 0.00872802734375, 0.1329345703125, 0.0199432373046875, 0.062255859375, 0.0860595703125, 0.034210205078125, 0.1441650390625, 0.005615234375, 0.052093505859375, 0.04193115234...
embed
75668318_c0
75668318
prolog
0
Title: Removing Item from List in Prolog Problem title: Removing Item from List in Prolog Tags: prolog Problem: Removing Item from List in Prolog I am having a little trouble understanding a snippet of code my professor shared with us in class: takeout(X, [X|R], R). takeout(X, [F|R], [F|S]) :- takeout(X,R,S) The genera...
Removing Item from List in Prolog Removing Item from List in Prolog prolog List Removing Item Prolog Removing Item from List in Prolog I am having a little trouble understanding a snippet of code my professor shared with us in class: The general idea of the code is to remove the element X. However, I am a little confus...
[ 0.0155029296875, 0.0184326171875, 0.01031494140625, 0.015380859375, -0.005615234375, 0.0145263671875, -0.02001953125, 0.02197265625, 0.01043701171875, 0.00121307373046875, 0.0186767578125, -0.007537841796875, -0.0185546875, 0.01171875, -0.00286865234375, -0.00070953369140625, 0.02392...
[ 853, 432, 6496, 78426, 1295, 32036, 1250, 4867, 23, 502, 63134, 100094, 18151, 16030, 18507, 6528, 87388, 12830, 1193, 55681, 15400, 17932, 111, 13315, 6626, 171859, 15044, 765, 563, 237, 6863, 10336, 28219, 41911, 5646, 6056, 1542, 1052, 2...
[ 0.0283660888671875, 0.14794921875, 0.0159454345703125, 0.2227783203125, 0.1207275390625, 0.1959228515625, 0.1595458984375, 0.218017578125, 0.008026123046875, 0.1231689453125, 0.010528564453125, 0.06719970703125, 0.156005859375, 0.019073486328125, 0.01153564453125, 0.0518798828125, 0....
embed
53245667_c0
53245667
prolog
0
Title: Prolog CryptoArithmetic Problem title: Prolog CryptoArithmetic Tags: prolog Problem: Prolog CryptoArithmetic I have completed the general arithmetic puzzle in Prolog. I need to know how to get all the possible solutions for each particular puzzle and put them in a separate output text file. I would appreciate an...
Prolog CryptoArithmetic Prolog CryptoArithmetic prolog Prolog CryptoArithmetic First Solution There puzzle2sol1.txt use_module Digits Digs1 Digs Digs2 Digs3 output.txt Prolog CryptoArithmetic I have completed the general arithmetic puzzle in Prolog. I need to know how to get all the possible solutions for each particul...
[ -0.00040435791015625, -0.01434326171875, 0.00732421875, 0.02783203125, -0.035400390625, 0.023193359375, -0.006500244140625, -0.0031280517578125, -0.0034027099609375, 0.0023345947265625, -0.00193023681640625, -0.0033721923828125, 0.015869140625, 0.0010223388671875, 0.0135498046875, 0.01...
[ 1250, 4867, 201543, 7614, 8962, 282, 9523, 502, 23972, 187895, 8622, 104192, 304, 8748, 124326, 4527, 83279, 51174, 933, 49688, 418, 7, 363, 140992, 140528, 4537, 187, 23, 3871, 3714, 3642, 2046, 756, 70, 7722, 51347, 12638, 17311, 3884, ...
[ 0.1832275390625, 0.2666015625, 0.151123046875, 0.021148681640625, 0.12060546875, 0.080078125, 0.04876708984375, 0.10430908203125, 0.0753173828125, 0.147705078125, 0.103759765625, 0.2188720703125, 0.049591064453125, 0.1419677734375, 0.11474609375, 0.04937744140625, 0.067626953125, 0...
embed
69074642_c1
69074642
prolog
1
, 0)]). However, I am unable to load the file into memory (even with 8G of heap): $ time eclipse -f snake_points.ecl -e 'halt.' *** Overflow of the global/trail stack in spite of garbage collection! You can use the "-g kBytes" (GLOBALSIZE) option to have a larger stack. Peak sizes were: global stack 8388576 kbytes, tra...
, 0)]). However, I am unable to load the file into memory (even with 8G of heap): $ time eclipse -f snake_points.ecl -e 'halt.' *** Overflow of the global/trail stack in spite of garbage collection! You can use the "-g kBytes" (GLOBALSIZE) option to have a larger stack. Peak sizes were: global stack 8388576 kbytes, tra...
[ 0.0257568359375, 0.005523681640625, -0.00872802734375, 0.01251220703125, -0.0181884765625, -0.0027618408203125, -0.01129150390625, 0.006866455078125, -0.000919342041015625, -0.052490234375, 0.019775390625, -0.00958251953125, -0.0264892578125, -0.0169677734375, 0.0093994140625, 0.006805...
[ 757, 268, 33306, 51, 2886, 47, 72367, 11435, 3934, 98323, 382, 724, 111, 764, 2631, 3650, 1733, 28, 106371, 184, 20, 420, 16854, 350, 38496, 7, 13, 34937, 23766, 9578, 118664, 7964, 1517, 379, 177261, 61518, 3671, 402, 429, 42486, 9, ...
[ 0.068603515625, 0.010345458984375, 0.05572509765625, 0.087158203125, 0.168212890625, 0.01019287109375, 0.1986083984375, 0.2130126953125, 0.10302734375, 0.21875, 0.07080078125, 0.094482421875, 0.016815185546875, 0.06475830078125, 0.0853271484375, 0.06378173828125, 0.1700439453125, 0...
embed
36680791_c0
36680791
prolog
0
Title: creep error in Prolog when I find a route Problem title: creep error in Prolog when I find a route Tags: transitive-closure, prolog, recursion, routes Problem: creep error in Prolog when I find a route I'm learning Prolog, and I'm getting creep error when I try to find a route. I think what I did is recursion be...
creep error in Prolog when I find a route creep error in Prolog when I find a route transitive-closure prolog recursion routes Prolog Store Exception _G4705 creep error in Prolog when I find a route I'm learning Prolog, and I'm getting creep error when I try to find a route. I think what I did is recursion because that...
[ 0.01153564453125, 0.0037994384765625, 0.01312255859375, 0.0167236328125, 0.020263671875, 0.00811767578125, -0.0262451171875, 0.0098876953125, 0.01123046875, -0.064453125, 0.0247802734375, -0.0098876953125, -0.0157470703125, 0.0126953125, 0.0228271484375, 0.013916015625, 0.00411987304...
[ 49512, 254, 18499, 1250, 4867, 3229, 7413, 36439, 23, 62621, 5844, 170224, 502, 195625, 1830, 14934, 5443, 63928, 724, 13330, 8194, 52080, 9790, 5351, 3917, 2685, 959, 80560, 60875, 18151, 1295, 9020, 47, 51651, 903, 444, 20594, 44691, 6192...
[ 0.230224609375, 0.208251953125, 0.2222900390625, 0.1695556640625, 0.26123046875, 0.025970458984375, 0.169677734375, 0.2325439453125, 0.031585693359375, 0.1224365234375, 0.081787109375, 0.1768798828125, 0.1019287109375, 0.195068359375, 0.1197509765625, 0.147705078125, 0.00741577148437...
embed
42978363_c0
42978363
prolog
0
Title: Prolog - proof tree misses possibilities Problem title: Prolog - proof tree misses possibilities Tags: prolog, logic-programming Problem: Prolog - proof tree misses possibilities I have the following Prolog Program: p(f(X), Y) :- p(g(X), g(Y)). p(g(X), Y) :- p(f(Y), f(X)). p(f(a), g(b)). The prolog proof tree ha...
Prolog - proof tree misses possibilities Prolog - proof tree misses possibilities prolog logic-programming Prolog fX5 Prolog - proof tree misses possibilities I have the following Prolog Program: The prolog proof tree has to be drawn for the predicate p(X, Y) . Question : Why is Y matched to Y1/Y and not to Y/Y1 and wh...
[ 0.031494140625, 0.017578125, -0.00262451171875, 0.0087890625, -0.0220947265625, 0.004547119140625, -0.0028228759765625, -0.01519775390625, 0.0025787353515625, -0.0027008056640625, 0.0147705078125, -0.0166015625, -0.0004787445068359375, -0.0167236328125, 0.0081787109375, 0.007568359375,...
[ 1250, 4867, 98869, 53201, 18025, 97370, 502, 62775, 28966, 1238, 1542, 758, 7663, 1556, 79442, 1653, 2063, 67, 915, 990, 68185, 44084, 83, 14858, 47, 50412, 1723, 959, 64, 418, 15400, 11814, 53333, 98, 3525, 177, 17727, 706, 70541, 1660, ...
[ 0.1455078125, 0.2200927734375, 0.187744140625, 0.225830078125, 0.1253662109375, 0.1722412109375, 0.1407470703125, 0.06988525390625, 0.0865478515625, 0.011871337890625, 0.084716796875, 0.10296630859375, 0.1036376953125, 0.0185546875, 0.133544921875, 0.1378173828125, 0.1470947265625, ...
embed
10047062_c0
10047062
prolog
0
Title: Prolog. Fill out lists Problem title: Prolog. Fill out lists Tags: prolog Problem: Prolog. Fill out lists I have to fill out a list of length n digits. I know that n-1 is in the range from 1 to 9, and one digit can be in the range from 1 to 99. I did it this way: generate([First|Next],Czynniki):- between(1,99,Fi...
Prolog. Fill out lists Prolog. Fill out lists prolog Prolog Fill First Next Czynniki generate2 N-1 Prolog. Fill out lists I have to fill out a list of length n digits. I know that n-1 is in the range from 1 to 9, and one digit can be in the range from 1 to 99. I did it this way: Doing it this way I generate some of the...
[ -0.003936767578125, -0.00567626953125, -0.005157470703125, 0.00738525390625, -0.0198974609375, 0.007476806640625, -0.01202392578125, 0.016357421875, 0.01806640625, -0.0191650390625, -0.018310546875, -0.000164031982421875, -0.0021514892578125, 0.01116943359375, 0.00408935546875, -0.0003...
[ 1250, 4867, 140423, 1810, 5303, 7, 502, 23972, 4997, 13935, 19, 10926, 139392, 304, 541, 5759, 87, 765, 26292, 140909, 653, 153939, 3714, 23, 37457, 1295, 106, 47, 483, 1632, 831, 10078, 6777, 3917, 903, 5701, 51347, 83425, 15490, 57346, ...
[ 0.2193603515625, 0.28857421875, 0.196533203125, 0.1854248046875, 0.25634765625, 0.0703125, 0.1512451171875, 0.1094970703125, 0.118896484375, 0.040924072265625, 0.062255859375, 0.10595703125, 0.198486328125, 0.0960693359375, 0.131591796875, 0.2276611328125, 0.000732421875, 0.0701904...
embed
43186492_c1
43186492
prolog
1
run list into the final output list append(TinyList, SubList, RunList). % checks if number is odd odd(Num):- 1 is Num mod 2. % checks if number is even even(Num):- 0 is Num mod 2. % checks if the polarity of 1st and 2nd numbers are same % returns [] if both numbers have same polarity % if 1st and 2nd numbers have diff...
run list into the final output list append(TinyList, SubList, RunList). % checks if number is odd odd(Num):- 1 is Num mod 2. % checks if number is even even(Num):- 0 is Num mod 2. % checks if the polarity of 1st and 2nd numbers are same % returns [] if both numbers have same polarity % if 1st and 2nd numbers have diff...
[ 0.01153564453125, 0.01904296875, 0.0184326171875, -0.0037841796875, -0.01385498046875, 0.015869140625, -0.00836181640625, 0.0026702880859375, 0.031494140625, 0.0189208984375, 0.01904296875, 0.0074462890625, 0.0213623046875, 0.0016937255859375, -0.00189971923828125, 0.0034332275390625, ...
[ 11675, 5303, 3934, 2704, 140992, 114689, 71, 16734, 299, 154663, 8273, 28398, 1745, 12765, 7, 2174, 14012, 83, 70270, 839, 316, 106, 52782, 2811, 787, 3853, 757, 160, 320, 2481, 271, 116, 2208, 101935, 5701, 30646, 15044, 12921, 1653, 206...
[ 0.209716796875, 0.2298583984375, 0.08367919921875, 0.129150390625, 0.2060546875, 0.14013671875, 0.040985107421875, 0.12255859375, 0.1055908203125, 0.21630859375, 0.118896484375, 0.1468505859375, 0.114013671875, 0.1685791015625, 0.008148193359375, 0.0684814453125, 0.171875, 0.072448...
embed
52693806_c0
52693806
prolog
0
Title: preventing backtracking without cut Problem title: preventing backtracking without cut Tags: prolog, prolog-cut Problem: preventing backtracking without cut Fairly new to prolog and trying to solve some exercises. Given a knowledge base of components component(ElementX,ElementY,Qty). ElementX uses ElementY in it...
preventing backtracking without cut preventing backtracking without cut prolog prolog-cut ElementX ElementY Qty final_product Results preventing backtracking without cut Fairly new to prolog and trying to solve some exercises. Given a knowledge base of components I want to find every ElementX that isn't an ElementY at ...
[ 0.01153564453125, 0.02978515625, 0.01806640625, 0.00994873046875, -0.028564453125, 0.0150146484375, -0.01263427734375, -0.0016937255859375, 0.00946044921875, -0.021484375, -0.02001953125, -0.0003204345703125, 0.006622314453125, -0.00157928466796875, -0.00347900390625, -0.00521850585937...
[ 56282, 214, 4420, 125728, 15490, 59226, 502, 4867, 19774, 48325, 1542, 1723, 2396, 939, 2704, 57877, 146104, 86869, 81979, 82761, 3444, 7413, 11907, 56112, 18, 5701, 84751, 16750, 18822, 831, 4527, 2046, 69307 ]
[ 0.202880859375, 0.0699462890625, 0.133544921875, 0.20361328125, 0.10382080078125, 0.1722412109375, 0.09381103515625, 0.1689453125, 0.154296875, 0.1666259765625, 0.153076171875, 0.1434326171875, 0.054962158203125, 0.105712890625, 0.1072998046875, 0.1123046875, 0.0968017578125, 0.023...
embed
74834622_c1
74834622
prolog
1
www.swi-prolog.org For built-in help, use ?- help(Topic). or ?- apropos(Word). interception_between( program( [argument(_, ARGUMENT_VALUE)|_], [change(ARGUMENT_VALUE, _)|[]]), FACTS, NEW_FACTS1) :- print("Found fact no more body"), append(FACTS, [problem(change(ARGUMENT_VALUE))], NEW_FACTS1). interception_between( prog...
www.swi-prolog.org For built-in help, use ?- help(Topic). or ?- apropos(Word). interception_between( program( [argument(_, ARGUMENT_VALUE)|_], [change(ARGUMENT_VALUE, _)|[]]), FACTS, NEW_FACTS1) :- print("Found fact no more body"), append(FACTS, [problem(change(ARGUMENT_VALUE))], NEW_FACTS1). interception_between( prog...
[ 0.00946044921875, -0.0030059814453125, 0.0001926422119140625, 0.0224609375, -0.000701904296875, 0.0277099609375, -0.00927734375, 0.0027313232421875, 0.01165771484375, 0.0025177001953125, 0.00726318359375, 0.0181884765625, -0.03564453125, 0.0016021728515625, 0.03271484375, -0.0231933593...
[ 7, 2452, 3454, 4867, 1478, 88303, 73, 4358, 4527, 705, 9, 77888, 1771, 707, 10, 189461, 164805, 1940, 63928, 4626, 1177, 33, 1528, 155937, 13685, 43578, 61152, 37066, 152028, 11909, 155816, 4, 80111, 919, 84161, 17727, 15772, 28412, 27591, ...
[ 0.018707275390625, 0.20458984375, 0.144287109375, 0.272216796875, 0.1068115234375, 0.1741943359375, 0.1041259765625, 0.245361328125, 0.126953125, 0.05718994140625, 0.065185546875, 0.1497802734375, 0.1021728515625, 0.000213623046875, 0.0533447265625, 0.265380859375, 0.1597900390625, ...
embed
34194464_c0
34194464
prolog
0
Title: Having trouble understanding Prolog DCG Problem title: Having trouble understanding Prolog DCG Tags: dcg, prolog Problem: Having trouble understanding Prolog DCG This is a new following up question of https://stackoverflow.com/questions/34170191/confused-about-how-to-use-in-prolog?noredirect=1#comment56112107_34...
Having trouble understanding Prolog DCG Having trouble understanding Prolog DCG dcg prolog Having Prolog DCG rel_clasue trans_verb Having trouble understanding Prolog DCG This is a new following up question of https://stackoverflow.com/questions/34170191/confused-about-how-to-use-in-prolog?noredirect=1#comment56112107_...
[ 0.016357421875, 0.005340576171875, 0.00921630859375, 0.0093994140625, 0.003387451171875, 0.0166015625, -0.0166015625, -0.010986328125, 0.01336669921875, -0.04736328125, -0.01177978515625, -0.007720947265625, 0.0033416748046875, 0.002532958984375, 0.01373291015625, 0.01031494140625, -...
[ 171855, 63134, 100094, 1250, 4867, 391, 56367, 238, 177, 502, 7962, 18347, 1159, 3900, 81465, 25632, 118664, 70547, 33740, 47251, 188, 4032, 73, 3454, 18151, 23, 181191, 1286, 113138, 15190, 122092, 147, 35166, 19713, 18822, 51515, 959, 4488,...
[ 0.0235748291015625, 0.150146484375, 0.16015625, 0.14794921875, 0.229248046875, 0.08642578125, 0.2308349609375, 0.0232086181640625, 0.05889892578125, 0.09808349609375, 0.1468505859375, 0.08380126953125, 0.0809326171875, 0.14306640625, 0.2335205078125, 0.001861572265625, 0.007751464843...
embed
36373318_c0
36373318
prolog
0
Title: Can&#x27;t use swi-prolog in eclipse Problem title: Can&#x27;t use swi-prolog in eclipse Tags: swi-prolog, eclipse-plugin, eclipse, prolog Problem: Can't use swi-prolog in eclipse When I launch the prolog view, the console shows: org.cs3.prolog.connector.process.PrologProcessException: org.cs3.prolog.connector.p...
Can&#x27;t use swi-prolog in eclipse Can&#x27;t use swi-prolog in eclipse swi-prolog eclipse-plugin eclipse prolog Can Can't use swi-prolog in eclipse When I launch the prolog view, the console shows: org.cs3.prolog.connector.process.PrologProcessException: org.cs3.prolog.connector.process.PrologProcessStartException: ...
[ 0.02001953125, 0.0103759765625, 0.0014495849609375, 0.0103759765625, -0.0106201171875, 0.000667572021484375, 0.00177764892578125, 0.0072021484375, -0.00604248046875, -0.032958984375, -0.00054931640625, -0.0086669921875, -0.01129150390625, 0.0101318359375, 0.0162353515625, -0.0069274902...
[ 4171, 3768, 18, 4527, 91, 2452, 3454, 4867, 23, 106371, 184, 145301, 502, 28, 83184, 21455, 130250, 30910, 4439, 363, 135457, 63923, 10752, 26531, 63928, 126597, 190355, 4034, 1250, 9433, 60875, 47, 71924, 2886, 56649, 90791, 26484, 179459, ...
[ 0.073974609375, 0.047698974609375, 0.076904296875, 0.1533203125, 0.04949951171875, 0.2442626953125, 0.1793212890625, 0.23876953125, 0.072021484375, 0.2144775390625, 0.1336669921875, 0.1046142578125, 0.1407470703125, 0.002227783203125, 0.05670166015625, 0.153564453125, 0.156494140625,...
embed
37138532_c0
37138532
prolog
0
Title: prolog list keeps expanding when semi colon is pressed Problem title: prolog list keeps expanding when semi colon is pressed Tags: prolog Problem: prolog list keeps expanding when semi colon is pressed Hi I am creating a predicate list from, which if used gives you the numbers between a certain range. So say for...
prolog list keeps expanding when semi colon is pressed prolog list keeps expanding when semi colon is pressed prolog list_from Mplusone prolog list keeps expanding when semi colon is pressed Hi I am creating a predicate list from, which if used gives you the numbers between a certain range. So say for instance would gi...
[ -0.005096435546875, 0.03271484375, -0.0048828125, 0.02197265625, -0.0014495849609375, 0.0272216796875, 0.00121307373046875, 0.0242919921875, 0.0032806396484375, -0.04296875, 0.0269775390625, -0.0216064453125, 0.014404296875, 0.015869140625, 0.0022430419921875, -0.00157928466796875, 0...
[ 502, 4867, 5303, 13695, 71062, 214, 3229, 36137, 46512, 30501, 161063, 276, 32108, 3630, 105233, 1653, 2063, 67, 1295, 11814, 76199, 101935, 17721, 24233, 37457, 5154, 110527, 2806, 8337, 33306, 4163, 759, 4488, 1284, 1660, 442, 118055, 1632,...
[ 0.14111328125, 0.211181640625, 0.2066650390625, 0.133544921875, 0.19677734375, 0.0972900390625, 0.0423583984375, 0.168701171875, 0.2047119140625, 0.166015625, 0.0257415771484375, 0.0927734375, 0.1630859375, 0.1988525390625, 0.0843505859375, 0.143798828125, 0.177490234375, 0.0661621...
embed