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
8829870_c0
8829870
prolog
0
Title: print all records using query in prolog Problem title: print all records using query in prolog Tags: prolog Problem: print all records using query in prolog lectures(monday, nolecture). lectures(tuesday, vp). lectures(tuesday, se). lectures(tuesday, ddbms). lectures(wednessday, ds). lectures(wednessday, mpl). le...
print all records using query in prolog print all records using query in prolog prolog query print all records using query in prolog the query print only first record as ds only, I want to print all record on particular day i.e Friday, the result should be ds and mpl . update me!
[ 0.0311279296875, -0.0084228515625, 0.0033416748046875, 0.02099609375, -0.0167236328125, 0.0093994140625, -0.0206298828125, 0.0086669921875, -0.004638671875, -0.04443359375, 0.00138092041015625, -0.02197265625, -0.00193023681640625, 0.018310546875, 0.004364013671875, -0.0005607604980468...
[ 28412, 756, 115923, 17368, 41, 23, 502, 4867, 1294, 4734, 5117, 17164, 237, 104, 7, 3444, 17311, 5155, 41626, 16750, 136, 2424, 28350 ]
[ 0.2222900390625, 0.1566162109375, 0.230224609375, 0.06622314453125, 0.1427001953125, 0.05499267578125, 0.1585693359375, 0.23486328125, 0.1773681640625, 0.037872314453125, 0.09490966796875, 0.16748046875, 0.0223541259765625, 0.042633056640625, 0.0433349609375, 0.057769775390625, 0.050...
embed
46189192_c0
46189192
prolog
0
Title: Datalog code not working in Racket Problem title: Datalog code not working in Racket Tags: datalog, racket, prolog Problem: Datalog code not working in Racket I am trying to port this Prolog code to Datalog in Racket, using example at bottom of this page . #lang datalog edge(a, b). edge(b, c). edge(c, d). edge(d...
Datalog code not working in Racket Datalog code not working in Racket datalog racket prolog Datalog Racket Datalog code not working in Racket I am trying to port this Prolog code to Datalog in Racket, using example at bottom of this page . But it is giving this error at [X,Z|L] on last line of code: How do I represent ...
[ 0.03125, 0.021484375, -0.00836181640625, 0.045166015625, -0.00067138671875, 0.037109375, -0.0162353515625, -0.004913330078125, -0.00604248046875, -0.044921875, -0.00537109375, -0.03173828125, -0.03515625, -0.003204345703125, 0.01708984375, 0.003631591796875, 0.0002956390380859375, ...
[ 11809, 4867, 18151, 959, 20697, 23, 2552, 27853, 2053, 673, 502, 11469, 1250, 47, 27781, 103136, 18499, 99, 1542, 4, 1511, 58745, 866, 98, 4568, 13315, 11249, 33636, 5303 ]
[ 0.140625, 0.212646484375, 0.1981201171875, 0.0667724609375, 0.1292724609375, 0.0693359375, 0.1265869140625, 0.2183837890625, 0.094970703125, 0.0819091796875, 0.139404296875, 0.0843505859375, 0.13720703125, 0.01165771484375, 0.04766845703125, 0.05682373046875, 0.1480712890625, 0.040...
embed
13875095_c0
13875095
prolog
0
Title: Problems with Tail Recursion and reversing list? Problem title: Problems with Tail Recursion and reversing list? Tags: recursion, tail, logic, prolog Problem: Problems with Tail Recursion and reversing list? Hello I have a call like this list of digits(436,L). How can I reverse the list, and make it tail recursi...
Problems with Tail Recursion and reversing list? Problems with Tail Recursion and reversing list? recursion tail logic prolog Problems Tail Recursion list_of_digits Problems with Tail Recursion and reversing list? Hello I have a call like this list of digits(436,L). How can I reverse the list, and make it tail recursiv...
[ -0.00165557861328125, 0.0155029296875, 0.0034942626953125, 0.007110595703125, -0.025146484375, 0.010009765625, 0.00299072265625, 0.0004329681396484375, 0.0205078125, -0.028564453125, 0.00543212890625, -0.0022735595703125, -0.00909423828125, 0.007537841796875, 0.0322265625, 0.0037994384...
[ 15649, 678, 1218, 379, 165428, 42, 6889, 136, 39531, 6953, 5303, 195625, 1830, 46741, 62775, 502, 4867, 4390, 4803, 35378, 11782, 1884, 903, 153939, 168865, 866, 11249, 831, 184, 3249, 5844, 4171, 35672, 4358, 22936, 3444, 27198, 14012, 393...
[ 0.1824951171875, 0.0667724609375, 0.192138671875, 0.179443359375, 0.1640625, 0.153564453125, 0.146728515625, 0.0845947265625, 0.2232666015625, 0.17236328125, 0.2135009765625, 0.2479248046875, 0.060699462890625, 0.275390625, 0.1568603515625, 0.08782958984375, 0.1390380859375, 0.0879...
embed
34087085_c0
34087085
prolog
0
Title: How to get last insert id in prolog Problem title: How to get last insert id in prolog Tags: prolog, mysql Problem: How to get last insert id in prolog I have 2 tables in MySQL. The first table has already values. Now I want to take the values of the last row and insert them in the 2nd table but I don't know how...
How to get last insert id in prolog How to get last insert id in prolog prolog mysql test How odbc_connect test1911 Options odbc_prepare Statement odbc_execute odbc_fetch Row ERROR Domain How to get last insert id in prolog I have 2 tables in MySQL. The first table has already values. Now I want to take the values of t...
[ 0.01324462890625, 0.0030517578125, 0.01373291015625, 0.025146484375, -0.0167236328125, 0.0228271484375, -0.0162353515625, -0.015869140625, 0.002197265625, -0.04443359375, 0.026611328125, -0.0084228515625, -0.033203125, -0.0234375, 0.00188446044921875, -0.0098876953125, -0.01647949218...
[ 11249, 2046, 4568, 183540, 3447, 23, 502, 4867, 759, 99247, 3034, 229, 65037, 135457, 2947, 1662, 152448, 4692, 22836, 29362, 206, 96190, 151206, 24638, 93702, 47, 116, 23180, 157146, 5117, 21771, 142424, 3444, 5646, 15555, 2208, 33022, 1250,...
[ 0.0306396484375, 0.1337890625, 0.23095703125, 0.26806640625, 0.215576171875, 0.07293701171875, 0.166015625, 0.2333984375, 0.00885009765625, 0.099365234375, 0.125732421875, 0.093505859375, 0.1358642578125, 0.1241455078125, 0.035369873046875, 0.07525634765625, 0.0992431640625, 0.0054...
embed
7066634_c2
7066634
prolog
2
'Y', 'Y', 'B', 'Y', 'Y', 'G'), cubo('R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'G', 'G', 'G', 'G', 'G', 'G', 'G', 'G', 'G', 'P', 'P', 'P', 'P', 'P', 'P', 'P', 'P', 'P', 'W', 'W', 'W', 'W', 'W', 'W', 'W', 'W', 'W', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y')). Prolog try ...
'Y', 'Y', 'B', 'Y', 'Y', 'G'), cubo('R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'G', 'G', 'G', 'G', 'G', 'G', 'G', 'G', 'G', 'P', 'P', 'P', 'P', 'P', 'P', 'P', 'P', 'P', 'W', 'W', 'W', 'W', 'W', 'W', 'W', 'W', 'W', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y')). Prolog try ...
[ -0.006500244140625, 0.00089263916015625, 0.00830078125, 0.0289306640625, -0.01068115234375, 0.0023193359375, -0.004913330078125, 0.01611328125, 0.01806640625, -0.0177001953125, -0.006591796875, 0.00042724609375, 0.00360107421875, 0.0208740234375, -0.015625, -0.02880859375, 0.00251770...
[ 1723, 571, 724, 314, 837, 1052, 1456, 1250, 4867, 9790, 86869, 1660, 678, 997, 420, 112664, 3444, 14192, 502, 7103, 201, 4034, 6713, 3789, 25813, 99, 18389, 541, 2965, 123099, 92, 25, 372, 28864, 26073, 59488, 20129, 188, 25074, 135206, ...
[ 0.1397705078125, 0.06591796875, 0.0606689453125, 0.1805419921875, 0.185791015625, 0.0909423828125, 0.03643798828125, 0.1341552734375, 0.197021484375, 0.07733154296875, 0.148681640625, 0.01031494140625, 0.043609619140625, 0.1468505859375, 0.1331787109375, 0.1783447265625, 0.0006713867...
embed
52046194_c1
52046194
prolog
1
read somewhere that findall could be used? But how do I combine the heuristic value to the node, for example Node "B" with a cost of 2, from A to B. Do I substitute the cost of 2, with the heuristic value/cost of 3. Please explain in more detail or direct me to another resource that would be beneficial right now? I co...
read somewhere that findall could be used? But how do I combine the heuristic value to the node, for example Node "B" with a cost of 2, from A to B. Do I substitute the cost of 2, with the heuristic value/cost of 3. Please explain in more detail or direct me to another resource that would be beneficial right now? I co...
[ -0.00311279296875, -0.00787353515625, -0.005218505859375, 0.02685546875, 0.009521484375, 0.0169677734375, 0.001312255859375, -0.004058837890625, 0.0213623046875, -0.0308837890625, 0.007568359375, -0.0208740234375, -0.006439208984375, -0.007720947265625, -0.0008697509765625, -0.01275634...
[ 12301, 7413, 5584, 5809, 11814, 3642, 54, 87, 70163, 764, 474, 48242, 34292, 47, 110, 112, 438, 571, 11034, 116, 1295, 335, 161740, 678, 587, 271, 1031, 73342, 177953, 48588, 28282, 1653, 2063, 4358, 11737, 720, 223, 1679, 502, 4867, 48...
[ 0.03955078125, 0.1768798828125, 0.2412109375, 0.04833984375, 0.121826171875, 0.05828857421875, 0.004058837890625, 0.00732421875, 0.1929931640625, 0.116943359375, 0.201904296875, 0.1767578125, 0.1693115234375, 0.0660400390625, 0.1622314453125, 0.140625, 0.1429443359375, 0.0669555664...
embed
28951199_c0
28951199
prolog
0
Title: I want to count the occurrences of an element in a list Problem title: I want to count the occurrences of an element in a list Tags: clpfd, count, list, prolog-dif, prolog Problem: I want to count the occurrences of an element in a list I want to count the occurrences of an element in a list, and if there is one...
I want to count the occurrences of an element in a list I want to count the occurrences of an element in a list clpfd count list prolog-dif prolog RestList I want to count the occurrences of an element in a list I want to count the occurrences of an element in a list, and if there is one then the predicate unique would...
[ 0.0019073486328125, 0.006378173828125, 0.01104736328125, -0.0169677734375, 0.00311279296875, 0.006195068359375, -0.006134033203125, 0.00555419921875, 0.02099609375, -0.0216064453125, -0.021240234375, -0.025634765625, 0.0213623046875, 0.00872802734375, 0.00830078125, -0.0001144409179687...
[ 3444, 47, 54529, 74918, 42, 69098, 12830, 23, 5303, 33139, 39557, 71, 502, 4867, 428, 420, 49756, 154663, 2174, 1632, 1653, 2063, 36998, 29568, 98320, 1286, 3501, 24145, 1250, 7413, 3714, 54 ]
[ 0.0855712890625, 0.042266845703125, 0.226806640625, 0.205810546875, 0.14501953125, 0.121826171875, 0.1988525390625, 0.05078125, 0.20751953125, 0.015716552734375, 0.050140380859375, 0.1009521484375, 0.11669921875, 0.2109375, 0.05462646484375, 0.0755615234375, 0.132568359375, 0.16137...
embed
30300129_c0
30300129
prolog
0
Title: How can I do cryptarithmetics in Prolog? Problem title: How can I do cryptarithmetics in Prolog? Tags: prolog, cryptarithmetic-puzzle Problem: How can I do cryptarithmetics in Prolog? Each of the 7 different letters stands for a different digit. The aim is to find a substitution of digits for the letters such th...
How can I do cryptarithmetics in Prolog? How can I do cryptarithmetics in Prolog? prolog cryptarithmetic-puzzle How Prolog How can I do cryptarithmetics in Prolog? Each of the 7 different letters stands for a different digit. The aim is to find a substitution of digits for the letters such that the resulting sum is ari...
[ -0.006195068359375, 0.000156402587890625, 0.00119781494140625, 0.013427734375, -0.02001953125, 0.010009765625, -0.01263427734375, 0.00732421875, -0.0137939453125, -0.0159912109375, -0.0052490234375, -0.0185546875, 0.00067901611328125, 0.0234375, -0.00299072265625, -0.003997802734375, ...
[ 11249, 831, 87, 54, 136791, 147, 8962, 282, 41637, 23, 1250, 4867, 502, 6, 9523, 1766, 13894, 133, 98423, 111, 361, 12921, 120820, 9157, 100, 153939, 10, 464, 83, 7413, 161740, 16750, 10554, 1928, 26785, 29806, 5608, 27489, 756, 162515, ...
[ 0.10003662109375, 0.11328125, 0.0880126953125, 0.1182861328125, 0.214111328125, 0.098876953125, 0.182373046875, 0.1644287109375, 0.171630859375, 0.10394287109375, 0.1978759765625, 0.28662109375, 0.138916015625, 0.036834716796875, 0.08929443359375, 0.06768798828125, 0.09539794921875, ...
embed
72925095_c0
72925095
prolog
0
Title: How could I merge two dictionaries, summing values of same keys? Problem title: How could I merge two dictionaries, summing values of same keys? Tags: prolog, swi-prolog Problem: How could I merge two dictionaries, summing values of same keys? What I want is something like merge(Dict1, Dict2, Merged) that behave...
How could I merge two dictionaries, summing values of same keys? How could I merge two dictionaries, summing values of same keys? prolog swi-prolog How Dict1 Dict2 Merged How could I merge two dictionaries, summing values of same keys? What I want is something like merge(Dict1, Dict2, Merged) that behaves like the foll...
[ 0.01141357421875, 0.01318359375, -0.00152587890625, 0.0125732421875, -0.01214599609375, 0.013916015625, -0.0179443359375, 0.0022430419921875, 0.0059814453125, -0.01507568359375, 0.002166748046875, 0.0216064453125, -0.007659912109375, -0.0000152587890625, 0.03759765625, -0.0061950683593...
[ 11249, 5809, 87, 42564, 6626, 45, 10763, 11, 10484, 166, 58838, 142424, 111, 5701, 22799, 502, 4867, 2452, 3454, 60897, 18, 418, 304, 6035, 17704, 3444, 14055, 15390, 68991, 1884, 25632, 69307, 62775, 56037, 35782, 33342, 94176, 11469, 100,...
[ 0.08428955078125, 0.110107421875, 0.0096435546875, 0.25, 0.1649169921875, 0.1226806640625, 0.1954345703125, 0.1422119140625, 0.1221923828125, 0.1671142578125, 0.1669921875, 0.1822509765625, 0.043792724609375, 0.1236572265625, 0.1668701171875, 0.069580078125, 0.1424560546875, 0.1328...
embed
61700101_c1
61700101
prolog
1
Forward(X, [Set0, Rest], [Set, Rest]):- \+ member(X, Set0), append([Set0, [X]], Set). pushForward(X, [Set, Rest0], [Set, Rest]):- member(X, Set), append([Rest0, [X]], Rest). set(Bag, Set, Rest):- foldl(pushForward, Bag, [[],[]], [Set, Rest]). set(Bag, Set):- set(Bag, Set, _). However, this doesn't really get to the hea...
Forward(X, [Set0, Rest], [Set, Rest]):- \+ member(X, Set0), append([Set0, [X]], Set). pushForward(X, [Set, Rest0], [Set, Rest]):- member(X, Set), append([Rest0, [X]], Rest). set(Bag, Set, Rest):- foldl(pushForward, Bag, [[],[]], [Set, Rest]). set(Bag, Set):- set(Bag, Set, _). However, this doesn't really get to the hea...
[ -0.004241943359375, 0.0089111328125, -0.0004673004150390625, 0.00933837890625, -0.01470947265625, 0.01104736328125, -0.0005645751953125, -0.018798828125, 0.034423828125, 0.007720947265625, -0.003936767578125, 0.037841796875, -0.003082275390625, -0.00738525390625, 0.0037384033203125, 0....
[ 1326, 19364, 1542, 294, 126, 2389, 49756, 1328, 32786, 19943, 77495, 114689, 71, 25944, 18537, 1052, 525, 5423, 192996, 18344, 20469, 7332, 127, 19413, 101, 26498, 2967, 32599, 19048, 40140, 18929, 151618, 3299, 26458, 124409, 11177, 7, 23, ...
[ 0.09417724609375, 0.2003173828125, 0.13623046875, 0.08905029296875, 0.138916015625, 0.1231689453125, 0.18115234375, 0.07098388671875, 0.1617431640625, 0.1761474609375, 0.097412109375, 0.138671875, 0.0001220703125, 0.1661376953125, 0.05609130859375, 0.1153564453125, 0.06591796875, 0...
embed
39673123_c0
39673123
prolog
0
Title: List manipulation with prolog Problem title: List manipulation with prolog Tags: prolog Problem: List manipulation with prolog I am trying to create a query that gives back the following: sky([1,2,3,4,5,6],X). X = [1,3,5,2,6,4] That is, it takes out every other element of a list, and does the same on the remaini...
List manipulation with prolog List manipulation with prolog prolog List Skied List manipulation with prolog I am trying to create a query that gives back the following: That is, it takes out every other element of a list, and does the same on the remaining list and puts everything together. This is my code so far. Can ...
[ -0.00141143798828125, 0.024169921875, 0.0181884765625, 0.00830078125, -0.03466796875, 0.0269775390625, -0.0191650390625, 0.0230712890625, 0.01068115234375, 0.000946044921875, 0.0216064453125, -0.0024566650390625, -0.038818359375, 0.00836181640625, -0.0021514892578125, 0.0198974609375, ...
[ 32036, 45258, 1363, 678, 502, 4867, 20491, 297, 31577, 28282, 41, 1294, 76199, 4420, 25632, 51776, 1810, 11907, 3789, 12830, 5303, 5701, 47143, 214, 3884, 26818, 25842, 18151, 2060, 73342, 15400, 23742, 18, 4488, 9433, 50155, 21176, 17997 ]
[ 0.23779296875, 0.20166015625, 0.050048828125, 0.06591796875, 0.14208984375, 0.241943359375, 0.2115478515625, 0.1656494140625, 0.0794677734375, 0.06640625, 0.1256103515625, 0.119140625, 0.038909912109375, 0.115478515625, 0.04779052734375, 0.02655029296875, 0.10986328125, 0.066772460...
embed
21860445_c0
21860445
prolog
0
Title: Generating a list in prolog Problem title: Generating a list in prolog Tags: prolog Problem: Generating a list in prolog Hello I want to make a program in Prolog, that given a list of numbers and a number, it appends all the concurences of position of the number in a second list. For example for the list (5,10,4...
Generating a list in prolog Generating a list in prolog prolog Generating Generating a list in prolog Hello I want to make a program in Prolog, that given a list of numbers and a number, it appends all the concurences of position of the number in a second list. For example for the list (5,10,4,5,6,5) and number =5 the ...
[ -0.002410888671875, 0.005096435546875, -0.00038909912109375, 0.002349853515625, -0.000728607177734375, 0.0025634765625, -0.00506591796875, 0.0341796875, 0.031982421875, -0.03125, -0.0089111328125, -0.000331878662109375, -0.017578125, 0.01226806640625, 0.000896453857421875, 0.0045166015...
[ 155370, 1916, 5303, 23, 502, 4867, 10, 35378, 3444, 3249, 1528, 1250, 34475, 101935, 136, 14012, 114689, 6468, 756, 108636, 69098, 19069, 17932, 11516, 963, 80389, 129678, 114997, 3525, 5608, 18151, 30646, 5117, 219173, 1193, 3714, 172337, 43...
[ 0.19140625, 0.05364990234375, 0.2242431640625, 0.04852294921875, 0.133544921875, 0.2349853515625, 0.0062255859375, 0.0286865234375, 0.05975341796875, 0.03466796875, 0.15869140625, 0.153076171875, 0.026763916015625, 0.1151123046875, 0.0164642333984375, 0.1116943359375, 0.110107421875,...
embed
77296535_c0
77296535
prolog
0
Title: How do I tell Prolog that a specific tuple is not in a list Problem title: How do I tell Prolog that a specific tuple is not in a list Tags: prolog Problem: How do I tell Prolog that a specific tuple is not in a list So I tried to tell prolog that in Lst there's a tuple with (a,b, ) but the last tuple member is ...
How do I tell Prolog that a specific tuple is not in a list How do I tell Prolog that a specific tuple is not in a list prolog How Prolog Lst How do I tell Prolog that a specific tuple is not in a list So I tried to tell prolog that in Lst there's a tuple with (a,b, ) but the last tuple member is not 2 but there are ot...
[ 0.00537109375, 0.00390625, -0.00543212890625, 0.00970458984375, -0.011962890625, 0.00482177734375, 0.001129150390625, 0.0101318359375, 0.01031494140625, 0.01409912109375, -0.0142822265625, -0.00183868408203125, 0.0048828125, 0.01953125, 0, 0.0164794921875, -0.00830078125, 0.0027008...
[ 11249, 14192, 1250, 4867, 29458, 370, 8705, 83, 959, 23, 5303, 10, 502, 271, 450, 339, 275, 4568, 32786, 116, 80854, 13648, 70541, 10461, 3034, 71, 98320 ]
[ 0.011474609375, 0.15576171875, 0.1705322265625, 0.2236328125, 0.1654052734375, 0.12158203125, 0.2176513671875, 0.08087158203125, 0.1903076171875, 0.1217041015625, 0.17626953125, 0.017242431640625, 0.10760498046875, 0.1070556640625, 0.00250244140625, 0.0078125, 0.0352783203125, 0.10...
embed
66893008_c0
66893008
prolog
0
Title: Prolog: Why is this predicate showing up as true? Problem title: Prolog: Why is this predicate showing up as true? Tags: prolog, logic Problem: Prolog: Why is this predicate showing up as true? so I have written this predicate in SWI prolog with the goal of having it succeed if its argument is an expression with...
Prolog: Why is this predicate showing up as true? Prolog: Why is this predicate showing up as true? prolog logic Prolog Why no_atoms X-Y Prolog: Why is this predicate showing up as true? so I have written this predicate in SWI prolog with the goal of having it succeed if its argument is an expression without any atoms ...
[ 0.01068115234375, 0.00982666015625, 0.002685546875, 0.021484375, -0.009765625, 0.03515625, 0.012939453125, 0.0078125, 0.01275634765625, -0.0032958984375, 0.0184326171875, -0.01470947265625, -0.0069580078125, -0.004364013671875, 0.01116943359375, 0.0032196044921875, 0.005218505859375,...
[ 1250, 4867, 44084, 83, 903, 1653, 2063, 67, 141377, 1257, 237, 29568, 502, 62775, 110, 454, 257, 28016, 1193, 9, 1723, 59121, 159, 38969, 69236, 214493, 2174, 10750, 125195, 15490, 2499, 34627, 3034, 104116, 86827, 1328, 425, 5608, 1380, ...
[ 0.1636962890625, 0.2188720703125, 0.1712646484375, 0.0826416015625, 0.117431640625, 0.1795654296875, 0.1993408203125, 0.1151123046875, 0.1466064453125, 0.1376953125, 0.1112060546875, 0.2137451171875, 0.1336669921875, 0.1031494140625, 0.1585693359375, 0.034027099609375, 0.167602539062...
embed
15443197_c0
15443197
prolog
0
Title: Sum of a series in Prolog Problem title: Sum of a series in Prolog Tags: exponentiation, prolog Problem: Sum of a series in Prolog I want to find sum of a series using Prolog program . For this purpose , I have written the following program : pow(N,1,R):- R is N. pow(N,M,R):- X is M-1,pow(N,X,R1),R is R1*N. sum(...
Sum of a series in Prolog Sum of a series in Prolog exponentiation prolog Sum Prolog M-1 Sum of a series in Prolog I want to find sum of a series using Prolog program . For this purpose , I have written the following program : I want to find the sum of following series : My believe is the above code is right . But when...
[ -0.0032501220703125, -0.0036773681640625, 0.0172119140625, 0.0052490234375, -0.00433349609375, 0.005706787109375, -0.0020294189453125, 0.022705078125, 0.021240234375, -0.0179443359375, -0.000438690185546875, 0.0037384033203125, -0.0181884765625, -0.0084228515625, 0.021484375, 0.0111083...
[ 36335, 111, 36549, 23, 1250, 4867, 10, 78643, 502, 276, 5759, 3444, 47, 7413, 10554, 17368, 1528, 59121, 70, 25632, 18822, 36917, 18151, 7108, 4966, 11675, 45831, 140992, 5021, 37842, 959, 2046, 84751 ]
[ 0.2470703125, 0.128662109375, 0.2215576171875, 0.05841064453125, 0.15185546875, 0.241943359375, 0.0235595703125, 0.0863037109375, 0.07916259765625, 0.039581298828125, 0.10125732421875, 0.041839599609375, 0.009246826171875, 0.1121826171875, 0.252197265625, 0.0258941650390625, 0.128662...
embed
2163448_c0
2163448
prolog
0
Title: Returning a value after a recursion in Prolog Problem title: Returning a value after a recursion in Prolog Tags: logic, prolog Problem: Returning a value after a recursion in Prolog I decided to study some logic programming and I stumbled across a problem. It is programmed in SWI Prolog. test(A, B, N):- nonvar(B...
Returning a value after a recursion in Prolog Returning a value after a recursion in Prolog logic prolog Returning Prolog Returning a value after a recursion in Prolog I decided to study some logic programming and I stumbled across a problem. It is programmed in SWI Prolog. It is just a sample with no real use except i...
[ -0.00144195556640625, 0.0184326171875, 0.01141357421875, 0.0240478515625, 0.009765625, 0.0087890625, -0.00726318359375, 0.0028839111328125, -0.00160980224609375, 0.004730224609375, 0.017333984375, 0.00592041015625, -0.0155029296875, 0.0034332275390625, 0.039794921875, 0.003875732421875...
[ 173340, 214, 34292, 7103, 195625, 1830, 1250, 4867, 62775, 502, 23, 56037, 2967, 26693, 159, 38969, 121413, 2773, 4527, 132442, 116666, 3229, 18151, 58359, 29568, 4034, 28560, 4420, 136, 35166, 9774, 3871, 65395, 19, 62, 54 ]
[ 0.2261962890625, 0.011993408203125, 0.193115234375, 0.140625, 0.250732421875, 0.1529541015625, 0.160400390625, 0.2418212890625, 0.1124267578125, 0.0845947265625, 0.00946044921875, 0.070068359375, 0.095703125, 0.10107421875, 0.0098876953125, 0.148193359375, 0.143798828125, 0.0071411...
embed
62080415_c0
62080415
prolog
0
Title: Write a program in Prolog to implement vanish(R,L,N) where R denotes the element whose all occurrences has to be remove from list L to obtain list N Problem title: Write a program in Prolog to implement vanish(R,L,N) where R denotes the element whose all occurrences has to be remove from list L to obtain list N ...
Write a program in Prolog to implement vanish(R,L,N) where R denotes the element whose all occurrences has to be remove from list L to obtain list N Write a program in Prolog to implement vanish(R,L,N) where R denotes the element whose all occurrences has to be remove from list L to obtain list N prolog list Write Prol...
[ -0.01300048828125, 0.0159912109375, 0.004638671875, 0.01019287109375, -0.0024871826171875, 0.0201416015625, -0.0169677734375, 0.006500244140625, -0.00726318359375, -0.00872802734375, 0.011474609375, -0.0009307861328125, -0.006439208984375, -0.0166015625, -0.00537109375, 0.0067749023437...
[ 601, 18781, 1528, 23, 1250, 4867, 29479, 131, 4745, 1052, 866, 839, 627, 8, 157, 12830, 756, 74918, 42, 69098, 1556, 87388, 1295, 5303, 339, 113054, 541, 4, 502 ]
[ 0.04168701171875, 0.04754638671875, 0.169921875, 0.049591064453125, 0.176513671875, 0.2471923828125, 0.16064453125, 0.1541748046875, 0.146484375, 0.138427734375, 0.1241455078125, 0.1314697265625, 0.16064453125, 0.02288818359375, 0.07635498046875, 0.1533203125, 0.06939697265625, 0.1...
embed
20848439_c1
20848439
prolog
1
), append(X,LR,S), N is NL+NR+1. find(R1, R2, node([Age,Name],L,R), [], 0) :- Age > R2;Age<R1. % if the age is greater than R2, return [] find(R1, R2, node([Age,Name],L,R), LL, N) :- R1 < Age, % if the age is bigger than R1 search the left tree return LL find(R1,R2,L,LL,NL), N is NL+1. find(R1, R2, node([Age,Name],L,R)...
), append(X,LR,S), N is NL+NR+1. find(R1, R2, node([Age,Name],L,R), [], 0) :- Age > R2;Age<R1. % if the age is greater than R2, return [] find(R1, R2, node([Age,Name],L,R), LL, N) :- R1 < Age, % if the age is bigger than R1 search the left tree return LL find(R1,R2,L,LL,NL), N is NL+1. find(R1, R2, node([Age,Name],L,R)...
[ -0.006103515625, 0.006134033203125, 0.00482177734375, 0.00628662109375, 0.004486083984375, 0.024169921875, -0.01171875, -0.0003566741943359375, 0.0125732421875, -0.0283203125, 0.0145263671875, -0.017822265625, 0.00421142578125, -0.0019989013671875, 0.03369140625, -0.00653076171875, 0...
[ 114689, 71, 1542, 138535, 294, 541, 83, 39102, 1328, 83752, 21748, 7413, 1052, 418, 627, 304, 110, 112, 284, 429, 163612, 866, 757, 15772, 72944, 16093, 1745, 32070, 117396, 30646, 99954, 4426, 167785, 33938, 25737, 53201, 101715, 164917, 7...
[ 0.1148681640625, 0.032073974609375, 0.06787109375, 0.1376953125, 0.05859375, 0.15380859375, 0.0253448486328125, 0.1600341796875, 0.1351318359375, 0.1370849609375, 0.1512451171875, 0.1875, 0.1143798828125, 0.07098388671875, 0.1314697265625, 0.13037109375, 0.1346435546875, 0.07171630...
embed
21721914_c0
21721914
prolog
0
Title: Arithmetic Error in Prolog Problem title: Arithmetic Error in Prolog Tags: prolog Problem: Arithmetic Error in Prolog I need to see if there are three people such that at least two are from the group g1. I wrote: ingroup(person1, g1). ingroup(person2, g1). ingroup(person3, g1). ingroup(person4, g2). ingroup(pers...
Arithmetic Error in Prolog Arithmetic Error in Prolog prolog Arithmetic Error Prolog person1 person2 person3 person4 person5 test_ok Arithmetic Error in Prolog I need to see if there are three people such that at least two are from the group g1. I wrote: This gives the following error in SWI Prolog: Where am I going wr...
[ 0.01611328125, 0.0019378662109375, -0.0130615234375, 0.01470947265625, 0.009521484375, 0.01458740234375, -0.01263427734375, 0.0208740234375, 0.01556396484375, -0.0185546875, 0.00049591064453125, 0.01708984375, 0.01422119140625, 0.004669189453125, 0.0162353515625, 0.006011962890625, 0...
[ 1172, 8962, 282, 9523, 212059, 23, 1250, 4867, 502, 3445, 418, 304, 363, 617, 758, 3034, 685, 3871, 1957, 2174, 2685, 17262, 3395, 6044, 19713, 6626, 621, 1295, 21115, 706, 25632, 18499, 159, 38969, 78662, 444, 87, 7730, 44691 ]
[ 0.049102783203125, 0.1700439453125, 0.1287841796875, 0.07110595703125, 0.209228515625, 0.067626953125, 0.2005615234375, 0.276611328125, 0.16650390625, 0.1412353515625, 0.09014892578125, 0.045501708984375, 0.07733154296875, 0.1094970703125, 0.1444091796875, 0.15673828125, 0.1225585937...
embed
17927125_c1
17927125
prolog
1
(tree(_,_,Right),N) :- postorder(Right,N). postorder(tree(N,_,_),N). search(t,I) :- bTTree(t(I,_,_)). search(t,I) :- bTTree(t(_,I,_)). search(t,I) :- bTTree(t(_,_,I)). search(t,I) :- bTTree(t(_,N,_)), search(N,I). search(t,I) :- bTTree(t(_,_,N)), search(N,I). height(t,H) :- bTTree(t(nil,nil,nil)), H is 0. height(t,H) :...
(tree(_,_,Right),N) :- postorder(Right,N). postorder(tree(N,_,_),N). search(t,I) :- bTTree(t(I,_,_)). search(t,I) :- bTTree(t(_,I,_)). search(t,I) :- bTTree(t(_,_,I)). search(t,I) :- bTTree(t(_,N,_)), search(N,I). search(t,I) :- bTTree(t(_,_,N)), search(N,I). height(t,H) :- bTTree(t(nil,nil,nil)), H is 0. height(t,H) :...
[ 0.024169921875, -0.00170135498046875, 0.0169677734375, 0.000048160552978515625, 0.0025634765625, 0.019287109375, -0.0206298828125, -0.0130615234375, 0.00177001953125, -0.04931640625, 0.004638671875, -0.02197265625, -0.0184326171875, -0.0125732421875, 0.0035858154296875, -0.003463745117...
[ 15, 62600, 132, 454, 4, 1052, 22553, 247, 839, 15772, 1305, 80596, 194, 33938, 18, 568, 876, 13739, 107, 13, 155955, 841, 17324, 572, 83, 757, 615, 2480, 17727, 10461, 18389, 418, 997, 183540, 1542, 866, 304, 28864, 26073, 7, 12, 87, ...
[ 0.11865234375, 0.298828125, 0.05010986328125, 0.1226806640625, 0.06103515625, 0.08984375, 0.18017578125, 0.08367919921875, 0.165283203125, 0.162841796875, 0.1903076171875, 0.27490234375, 0.10595703125, 0.2275390625, 0.09588623046875, 0.1572265625, 0.04736328125, 0.058746337890625, ...
embed
64876971_c1
64876971
prolog
1
greater than 5 elements, 2 is greater than 0 elements, 4 is greater than 1 element, and so on) The actual output currently is 5; then false . My program seems to be correctly evaluating and incrementing for the head element but when it finishes greaterThan for that element the program returns false. I've tried researc...
greater than 5 elements, 2 is greater than 0 elements, 4 is greater than 1 element, and so on) The actual output currently is 5; then false . My program seems to be correctly evaluating and incrementing for the head element but when it finishes greaterThan for that element the program returns false. I've tried researc...
[ -0.000782012939453125, 0.037841796875, 0.00347900390625, -0.002197265625, -0.0019989013671875, 0.01544189453125, 0.0213623046875, -0.00335693359375, 0.0208740234375, 0.005218505859375, 0.0111083984375, -0.005584716796875, -0.000701904296875, 0.01361083984375, 0.01190185546875, -0.03222...
[ 117396, 3501, 190, 80854, 116, 757, 201, 106, 12830, 8561, 140992, 82424, 98320, 1528, 37202, 26785, 151575, 158661, 100, 10336, 1284, 3229, 67229, 1121, 30646, 25188, 100094, 5303, 195625, 5844, 11782, 502, 4867, 5962, 58982, 35782, 11675, 4...
[ 0.2003173828125, 0.051666259765625, 0.1484375, 0.2144775390625, 0.09820556640625, 0.1092529296875, 0.1326904296875, 0.019439697265625, 0.1651611328125, 0.11669921875, 0.2135009765625, 0.09405517578125, 0.2183837890625, 0.1571044921875, 0.047027587890625, 0.06488037109375, 0.094238281...
embed
5782698_c0
5782698
prolog
0
Title: Prolog Creating A List Problem title: Prolog Creating A List Tags: prolog, list Problem: Prolog Creating A List I try to create a list from the facts: mother(jane,jerry). mother(susan,riche). mother(helen,kuyt). I want to convert mothers' names to a list that has a number of elements in it like: momlist([jane,su...
Prolog Creating A List Prolog Creating A List prolog list Prolog Creating List Number NewNum Number-1 Prolog Creating A List I try to create a list from the facts: I want to convert mothers' names to a list that has a number of elements in it like: I tried to create this with: It just write number times mom's names.. H...
[ 0.0189208984375, -0.004180908203125, 0.00000521540641784668, 0.0247802734375, 0.0026397705078125, 0.0262451171875, -0.00982666015625, 0.031005859375, 0.0015869140625, -0.04052734375, 0.00034332275390625, -0.031982421875, -0.001129150390625, -0.0042724609375, 0.016357421875, 0.001342773...
[ 1250, 4867, 56781, 1916, 62, 32036, 502, 5303, 103332, 2356, 839, 316, 5759, 87, 9790, 28282, 10, 1295, 70, 15824, 3444, 96760, 42732, 7, 25, 123055, 47, 14012, 80854, 23, 1884, 37842, 903, 678, 1660, 33022, 20028, 32318, 11249, 831, 27...
[ 0.158935546875, 0.2332763671875, 0.14794921875, 0.076416015625, 0.081787109375, 0.2412109375, 0.1195068359375, 0.228271484375, 0.1650390625, 0.1241455078125, 0.056976318359375, 0.1658935546875, 0.1097412109375, 0.0184783935546875, 0.088134765625, 0.1612548828125, 0.0282135009765625, ...
embed
29357120_c0
29357120
prolog
0
Title: Prolog simple assignment not simple for me Problem title: Prolog simple assignment not simple for me Tags: prolog Problem: Prolog simple assignment not simple for me I must say that I don't understand this language at all but I want to learn it by example so please understand me. I have to write out all persons ...
Prolog simple assignment not simple for me Prolog simple assignment not simple for me prolog Prolog Prolog simple assignment not simple for me I must say that I don't understand this language at all but I want to learn it by example so please understand me. I have to write out all persons that have borrowed at least tw...
[ 0.0225830078125, 0.00799560546875, -0.00145721435546875, 0.0341796875, -0.0028839111328125, 0.03662109375, -0.027587890625, -0.0010223388671875, 0.010498046875, -0.02685546875, 0.009765625, -0.0263671875, -0.00177764892578125, 0.0230712890625, -0.00168609619140625, -0.009521484375, 0...
[ 1250, 4867, 8781, 95486, 674, 959, 100, 163, 502, 8110, 5154, 2301, 18, 28219, 46876, 756, 3444, 30698, 390, 27781, 22936, 765, 47, 33022, 1810, 3445, 450, 3017, 15555, 19713, 6626, 55769, 1272, 3447, 31330, 6097, 11853, 63399 ]
[ 0.187744140625, 0.27392578125, 0.229248046875, 0.2174072265625, 0.09527587890625, 0.13671875, 0.133056640625, 0.1353759765625, 0.1475830078125, 0.035858154296875, 0.0249481201171875, 0.076171875, 0.05670166015625, 0.119384765625, 0.137939453125, 0.107421875, 0.05731201171875, 0.078...
embed
37560222_c0
37560222
prolog
0
Title: SWI Prolog func pack Problem title: SWI Prolog func pack Tags: prolog, swi-prolog Problem: SWI Prolog func pack I've got a prolog source file that allows me to use the ($)/2 meta predicate fine, but when I convert it to a module as follows, I get syntax errors wherever $ used to work: :- module('mymodule', [mypr...
SWI Prolog func pack SWI Prolog func pack prolog swi-prolog SWI Prolog mypred1 mypred2 use_module SWI Prolog func pack I've got a prolog source file that allows me to use the ($)/2 meta predicate fine, but when I convert it to a module as follows, I get syntax errors wherever $ used to work: I've tried reexport as well...
[ 0.020263671875, -0.00396728515625, 0.01556396484375, 0.006744384765625, -0.0264892578125, 0.004730224609375, 0.0169677734375, 0.01019287109375, 0.0166015625, -0.055908203125, 0.0234375, 0.0245361328125, -0.01458740234375, -0.00299072265625, 0.01129150390625, 0.02587890625, -0.0064697...
[ 159, 38969, 1250, 4867, 7477, 43824, 502, 91, 2452, 3454, 759, 19714, 418, 304, 4527, 83279, 31344, 11435, 114864, 4369, 12477, 23550, 1653, 2063, 67, 5885, 96760, 47, 88996, 28960, 6002, 86531, 18499, 3650, 11814, 4488, 456, 180758, 25820,...
[ 0.08349609375, 0.23486328125, 0.15478515625, 0.2183837890625, 0.1070556640625, 0.1695556640625, 0.1365966796875, 0.034210205078125, 0.2039794921875, 0.1082763671875, 0.1162109375, 0.2275390625, 0.07122802734375, 0.1129150390625, 0.0784912109375, 0.1287841796875, 0.1429443359375, 0....
embed
50711104_c0
50711104
prolog
0
Title: what categories do relational languages describe? Problem title: what categories do relational languages describe? Tags: logic-programming, computer-science, category-theory, minikanren, prolog Problem: what categories do relational languages describe? I read that lambda calculus is the language of cartesian clo...
what categories do relational languages describe? what categories do relational languages describe? logic-programming computer-science category-theory minikanren prolog what categories do relational languages describe? I read that lambda calculus is the language of cartesian closed categories. As I understand it, relat...
[ 0.025390625, 0.005279541015625, 0.005706787109375, 0.005218505859375, 0.006256103515625, -0.0004825592041015625, 0.00244140625, -0.0181884765625, -0.002838134765625, -0.0380859375, -0.0225830078125, -0.043701171875, -0.02392578125, -0.0093994140625, -0.00177001953125, 0.0098876953125, ...
[ 2367, 39283, 7, 41911, 289, 46876, 98363, 62775, 28966, 13909, 175201, 95487, 2347, 30675, 7665, 331, 982, 502, 4867, 21, 6492, 85, 44805, 223, 83, 70, 111, 129912, 3378, 155738, 28219, 2831, 2806, 160404, 32354, 5361, 7225, 91582, 831, 5...
[ 0.022857666015625, 0.260986328125, 0.144775390625, 0.219970703125, 0.16943359375, 0.2440185546875, 0.18798828125, 0.10321044921875, 0.08544921875, 0.036407470703125, 0.046356201171875, 0.2073974609375, 0.04095458984375, 0.0189056396484375, 0.1334228515625, 0.1131591796875, 0.18701171...
embed
55208046_c0
55208046
prolog
0
Title: hoofers club in prolog Problem title: hoofers club in prolog Tags: prolog, logic Problem: hoofers club in prolog I'm pretty sure about the facts that I declared, which are the following: hoof(tony). hoof(tim). hoof(ellen). hoof(X) :- skier(X); climber(X). not(likes(X, rain)) :- climber(X). likes(X, snow) :- skie...
hoofers club in prolog hoofers club in prolog prolog logic existence_error top_level hoofers club in prolog I'm pretty sure about the facts that I declared, which are the following: And when I try to query with hoof(X), climber(X), \+skier(X). , it returns with an error message of: What am I missing here?
[ 0.01275634765625, 0.0208740234375, -0.00689697265625, 0.01251220703125, -0.016845703125, 0.01025390625, 0.00107574462890625, -0.0021820068359375, 0.01019287109375, -0.03564453125, 0.004150390625, -0.00836181640625, -0.00144195556640625, -0.01385498046875, 0.01226806640625, -0.012145996...
[ 66752, 1314, 11938, 502, 4867, 62775, 116311, 188800, 2663, 67919, 28875, 9077, 15824, 159978, 9790, 41, 1294, 678, 1542, 194637, 56, 1328, 1336, 30646, 18499, 26008, 4865, 444, 87, 132283, 3688 ]
[ 0.241455078125, 0.163330078125, 0.228759765625, 0.1156005859375, 0.220947265625, 0.16796875, 0.133056640625, 0.1629638671875, 0.075927734375, 0.1328125, 0.012237548828125, 0.07861328125, 0.0794677734375, 0.10595703125, 0.0814208984375, 0.0872802734375, 0.111572265625, 0.03173828125...
embed
37878212_c0
37878212
prolog
0
Title: (Prolog) Finding neighbors in a list Problem title: (Prolog) Finding neighbors in a list Tags: prolog, list Problem: (Prolog) Finding neighbors in a list We have to write a Prolog predicate neighbors(X,Y,L) which is true if L is a list and X and Y are neighbor elements in the list. So far I wrote: neighbors(X,X,...
(Prolog) Finding neighbors in a list (Prolog) Finding neighbors in a list prolog list Prolog Finding (Prolog) Finding neighbors in a list We have to write a Prolog predicate neighbors(X,Y,L) which is true if L is a list and X and Y are neighbor elements in the list. So far I wrote: but the output would always give (obv...
[ 0.000576019287109375, -0.01080322265625, 0.0025787353515625, -0.0029144287109375, -0.003936767578125, 0.0257568359375, -0.01336669921875, 0.005615234375, 0.010009765625, -0.028076171875, 0.00183868408203125, 0.003997802734375, -0.02978515625, 0.000225067138671875, 0.003570556640625, 0....
[ 10752, 4867, 26040, 208244, 7, 23, 5303, 502, 1250, 33022, 1653, 2063, 67, 1542, 1723, 866, 29568, 2174, 339, 83, 1193, 136, 990, 80854, 2060, 54397, 140992, 11343, 8337, 201505, 1620, 27853, 378, 107730, 67660, 52295 ]
[ 0.1136474609375, 0.1988525390625, 0.1256103515625, 0.265625, 0.1407470703125, 0.05108642578125, 0.1837158203125, 0.1151123046875, 0.1490478515625, 0.08575439453125, 0.14111328125, 0.1812744140625, 0.05804443359375, 0.0697021484375, 0.0909423828125, 0.102783203125, 0.142578125, 0.01...
embed
75010105_c0
75010105
prolog
0
Title: Prolog: count number of predicates relating to an atom Problem title: Prolog: count number of predicates relating to an atom Tags: prolog, swi-prolog Problem: Prolog: count number of predicates relating to an atom I have a set of facts in Prolog, such that: likes(alice, burger). likes(bob, burger). likes(charlie...
Prolog: count number of predicates relating to an atom Prolog: count number of predicates relating to an atom prolog swi-prolog Prolog Prolog: count number of predicates relating to an atom I have a set of facts in Prolog, such that: I want to know what's the most popular dish (burgers in the example above). I'm not in...
[ 0.01513671875, -0.0042724609375, -0.006683349609375, 0.01214599609375, -0.00994873046875, 0.026123046875, 0.019775390625, -0.017578125, -0.01153564453125, -0.0498046875, -0.00799560546875, -0.020751953125, -0.008544921875, -0.00531005859375, 0.01397705078125, 0.00775146484375, -0.013...
[ 1250, 4867, 54529, 14012, 1653, 2063, 1636, 33444, 34627, 502, 91, 2452, 3454, 111, 214, 5423, 15824, 23, 3444, 3714, 2367, 2684, 5700, 45, 1495, 109498, 27781, 959, 60892, 116, 2208, 138, 4216, 903, 41, 1294, 5303, 205537, 831, 6183, 4...
[ 0.175048828125, 0.2474365234375, 0.202880859375, 0.1658935546875, 0.198486328125, 0.23291015625, 0.1248779296875, 0.126708984375, 0.218994140625, 0.1231689453125, 0.009063720703125, 0.1553955078125, 0.1396484375, 0.01361083984375, 0.0200653076171875, 0.0181732177734375, 0.158203125, ...
embed
11445340_c0
11445340
prolog
0
Title: Purpose of param in do-loops Problem title: Purpose of param in do-loops Tags: prolog Problem: Purpose of param in do-loops I'm learning Prolog from "Learn Prolog" book. I'm quite newbie in Prolog. I have knowledge base: transpose(Matrix, Transpose) :- dim(Matrix, [R, C]), dim(Transpose, [C, R]), ( foreachelem(E...
Purpose of param in do-loops Purpose of param in do-loops prolog Purpose Matrix Transpose Purpose of param in do-loops I'm learning Prolog from "Learn Prolog" book. I'm quite newbie in Prolog. I have knowledge base: Run: Result: I do not understand the purpose of param . Help me understand. Thanks.
[ 0.011962890625, 0.00909423828125, 0.027099609375, -0.0018157958984375, -0.018798828125, -0.00127410888671875, -0.0054931640625, -0.00640869140625, 0.0133056640625, -0.0174560546875, 0.0184326171875, -0.00101470947265625, -0.0157470703125, 0.00799560546875, -0.0172119140625, -0.00363159...
[ 16915, 78381, 111, 121, 39, 23, 54, 28354, 7, 502, 4867, 194234, 11062, 52080, 1250, 147, 12877, 9014, 51359, 3647, 28398, 126684, 959, 28219, 60042, 39527 ]
[ 0.216796875, 0.18505859375, 0.09716796875, 0.2281494140625, 0.2073974609375, 0.06195068359375, 0.133056640625, 0.2177734375, 0.0233917236328125, 0.1400146484375, 0.2056884765625, 0.176025390625, 0.112060546875, 0.05303955078125, 0.1146240234375, 0.036163330078125, 0.03369140625, 0....
embed
13731727_c0
13731727
prolog
0
Title: Satisfying formula values PROLOG Problem title: Satisfying formula values PROLOG Tags: prolog Problem: Satisfying formula values PROLOG I've tried to write a predicate that returns all satisfactory combinations for that predicate. For example... val_form(F,L1,L2) as F being the predicate, L1 the list of its vari...
Satisfying formula values PROLOG Satisfying formula values PROLOG prolog Satisfying PROLOG val_form Satisfying formula values PROLOG I've tried to write a predicate that returns all satisfactory combinations for that predicate. For example... val_form(F,L1,L2) as F being the predicate, L1 the list of its variables, and...
[ 0.0206298828125, 0.01165771484375, -0.0166015625, -0.0004425048828125, -0.0125732421875, 0.002471923828125, 0.005706787109375, 0.0177001953125, 0.0247802734375, -0.017578125, 0.014892578125, -0.01434326171875, 0.030517578125, 0.00823974609375, 0.000576019287109375, -0.00830078125, 0....
[ 947, 1814, 18929, 26168, 142424, 10514, 47510, 214, 502, 4867, 3502, 5037, 37842, 33022, 1653, 2063, 67, 30646, 756, 64561, 31667, 162515, 919, 866, 418, 10461, 563, 8035, 339, 5303, 77336, 304, 140992, 27781, 1250, 5608, 11417, 2819, 17721...
[ 0.11572265625, 0.1715087890625, 0.15087890625, 0.2498779296875, 0.205810546875, 0.177001953125, 0.2274169921875, 0.047149658203125, 0.1435546875, 0.2333984375, 0.1715087890625, 0.2220458984375, 0.0810546875, 0.0916748046875, 0.161865234375, 0.19384765625, 0.0699462890625, 0.1762695...
embed
33451596_c0
33451596
prolog
0
Title: How to parse a list and form a number in Prolog? Problem title: How to parse a list and form a number in Prolog? Tags: list, prolog Problem: How to parse a list and form a number in Prolog? I would like to know if someone could help me with a problem in prolog. I have to define two predicates but before that, I ...
How to parse a list and form a number in Prolog? How to parse a list and form a number in Prolog? list prolog How Prolog RES RES2 How to parse a list and form a number in Prolog? I would like to know if someone could help me with a problem in prolog. I have to define two predicates but before that, I need to find out a...
[ -0.01165771484375, 0.00012683868408203125, -0.01287841796875, 0.00299072265625, -0.0023193359375, 0.0283203125, -0.01336669921875, 0.0162353515625, 0.0145263671875, -0.034912109375, -0.0045166015625, -0.0211181640625, -0.0272216796875, 0.007659912109375, 0, 0.00188446044921875, 0.028...
[ 11249, 47, 366, 184, 5303, 136, 3173, 14012, 23, 1250, 4867, 502, 61661, 304, 10, 1884, 4358, 2967, 61924, 6626, 1653, 2063, 3917, 3642, 68252, 155761, 44357, 37638, 43240, 18151, 33342, 3714, 4127 ]
[ 0.07318115234375, 0.0455322265625, 0.1776123046875, 0.142822265625, 0.235595703125, 0.1019287109375, 0.2271728515625, 0.2294921875, 0.0972900390625, 0.1793212890625, 0.256103515625, 0.1292724609375, 0.10064697265625, 0.1080322265625, 0.0218353271484375, 0.00726318359375, 0.0337524414...
embed
47317413_c0
47317413
prolog
0
Title: How to use user input in prolog to search Problem title: How to use user input in prolog to search Tags: testing, variables, input, prolog Problem: How to use user input in prolog to search hello i want to be able to get the user input then store it and use in in my code. body(mercury, 36, small, none, none). bo...
How to use user input in prolog to search How to use user input in prolog to search testing variables input prolog How Body Miles Enter Goal State How to use user input in prolog to search hello i want to be able to get the user input then store it and use in in my code.
[ 0.01055908203125, 0.001434326171875, 0.006256103515625, 0.0145263671875, -0.006378173828125, 0.01519775390625, 0.00518798828125, 0.000942230224609375, 0.0029754638671875, -0.044921875, 0.0179443359375, 0.00433349609375, -0.03466796875, -0.0179443359375, 0.0299072265625, -0.000579833984...
[ 11249, 4527, 38937, 107730, 23, 502, 4867, 47, 33938, 134234, 77336, 43960, 52999, 7, 60816, 2016, 289, 22836, 33600, 3444, 19048, 2046, 4343, 18151 ]
[ 0.039154052734375, 0.1151123046875, 0.1929931640625, 0.25048828125, 0.06512451171875, 0.1717529296875, 0.2314453125, 0.058837890625, 0.2364501953125, 0.16015625, 0.1741943359375, 0.1556396484375, 0.188232421875, 0.050567626953125, 0.1220703125, 0.106689453125, 0.060699462890625, 0....
embed
50361141_c0
50361141
prolog
0
Title: Prolog find permutations of a list, values inside the permutation cannot be the same value Problem title: Prolog find permutations of a list, values inside the permutation cannot be the same value Tags: clpfd, prolog Problem: Prolog find permutations of a list, values inside the permutation cannot be the same va...
Prolog find permutations of a list, values inside the permutation cannot be the same value Prolog find permutations of a list, values inside the permutation cannot be the same value clpfd prolog Prolog List fd_domain fd_all_different Prolog find permutations of a list, values inside the permutation cannot be the same v...
[ -0.00106048583984375, 0.009765625, 0.01123046875, 0.0030059814453125, -0.010498046875, 0.0076904296875, -0.016845703125, 0.01361083984375, 0.00469970703125, -0.032470703125, -0.01416015625, 0.001068115234375, 0.0299072265625, 0.01318359375, -0.00384521484375, 0.0167236328125, 0.01153...
[ 1250, 4867, 7413, 117, 14311, 21094, 5303, 142424, 46132, 561, 22062, 53418, 186, 5701, 34292, 111, 70, 39557, 71, 502, 32036, 1238, 56206, 454, 5584, 238778, 11853, 75935, 10, 190, 80854, 3444, 3249, 9077, 621, 12921, 15700, 3917, 91995, ...
[ 0.161865234375, 0.252685546875, 0.134765625, 0.1549072265625, 0.238037109375, 0.11474609375, 0.1988525390625, 0.1649169921875, 0.1585693359375, 0.192138671875, 0.0645751953125, 0.1436767578125, 0.06787109375, 0.1214599609375, 0.13916015625, 0.1046142578125, 0.00006103515625, 0.0092...
embed
54674711_c0
54674711
prolog
0
Title: Why does my else statement in prolog execute even if it doesn&#x27;t satisfy the condition? Problem title: Why does my else statement in prolog execute even if it doesn&#x27;t satisfy the condition? Tags: prolog Problem: Why does my else statement in prolog execute even if it doesn't satisfy the condition? I'm n...
Why does my else statement in prolog execute even if it doesn&#x27;t satisfy the condition? Why does my else statement in prolog execute even if it doesn&#x27;t satisfy the condition? prolog Why Why does my else statement in prolog execute even if it doesn't satisfy the condition? I'm new to Prolog and I am confused be...
[ 0.0005340576171875, 0.01031494140625, 0.00848388671875, 0.002777099609375, 0.0062255859375, 0.01177978515625, -0.00531005859375, -0.007080078125, 0.00677490234375, 0.0225830078125, 0.0150146484375, -0.0196533203125, 0.0107421875, 0.00872802734375, 0.0189208984375, 0.0040283203125, 0....
[ 44084, 14602, 759, 37076, 63805, 502, 4867, 71924, 13, 3853, 2174, 22027, 3768, 18, 40407, 53, 35431, 23, 1250, 55681, 6637, 70731, 83, 8035, 23356, 9790, 107730, 28412, 839, 316, 86827, 35914, 18151, 140992, 84751, 16750, 16792, 62, 711, ...
[ 0.1219482421875, 0.0921630859375, 0.057373046875, 0.26904296875, 0.2332763671875, 0.1700439453125, 0.25048828125, 0.2100830078125, 0.12744140625, 0.13671875, 0.130615234375, 0.15625, 0.0738525390625, 0.166015625, 0.1854248046875, 0.108642578125, 0.200927734375, 0.059234619140625, ...
embed
10325085_c0
10325085
prolog
0
Title: Where is the heaps.P library in XSB Prolog? Problem title: Where is the heaps.P library in XSB Prolog? Tags: data-structures, xsb, prolog Problem: Where is the heaps.P library in XSB Prolog? The XSB documentation has a paragraph about a heap data structure library, in the manual volume 2 Section 1.16.5. But I ca...
Where is the heaps.P library in XSB Prolog? Where is the heaps.P library in XSB Prolog? data-structures xsb prolog Where heaps.P XSB Prolog Where is the heaps.P library in XSB Prolog? The XSB documentation has a paragraph about a heap data structure library, in the manual volume 2 Section 1.16.5. But I can't find any s...
[ 0.006500244140625, 0.0208740234375, -0.00811767578125, -0.005126953125, -0.0067138671875, 0.044677734375, 0.00909423828125, -0.01495361328125, 0.00604248046875, -0.0230712890625, 0.0128173828125, 0.000759124755859375, 0.029052734375, -0.014404296875, 0.02587890625, -0.004669189453125, ...
[ 78662, 83, 17305, 6423, 5, 683, 35773, 1294, 1193, 36474, 1250, 4867, 23, 2053, 137656, 1022, 275, 502, 209806, 151268, 764, 2631, 45646, 23009, 21950, 116, 140978, 136473, 7413, 24092, 31344, 1815, 903, 32316, 7464, 37105, 12684, 139109, 7...
[ 0.091552734375, 0.023681640625, 0.1927490234375, 0.2064208984375, 0.054443359375, 0.1571044921875, 0.2119140625, 0.1490478515625, 0.08795166015625, 0.1971435546875, 0.111328125, 0.1953125, 0.005584716796875, 0.09808349609375, 0.102294921875, 0.0211029052734375, 0.1063232421875, 0.0...
embed
20408784_c0
20408784
prolog
0
Title: how to turn a number from the unit form into an integer in prolog? Problem title: how to turn a number from the unit form into an integer in prolog? Tags: prolog, successor-arithmetics Problem: how to turn a number from the unit form into an integer in prolog? I have his code in prolog: int2term(0,0). int2term(N...
how to turn a number from the unit form into an integer in prolog? how to turn a number from the unit form into an integer in prolog? prolog successor-arithmetics the int2term N-1 term2int how to turn a number from the unit form into an integer in prolog? I have his code in prolog: that shows a number from this form s(...
[ -0.0010986328125, 0.0223388671875, 0.01171875, 0.0126953125, -0.01904296875, 0.00136566162109375, 0.004913330078125, 0.0189208984375, 0.0027618408203125, -0.0213623046875, 0.006011962890625, 0.0034332275390625, -0.0279541015625, 0.0224609375, 0.015869140625, -0.004486083984375, 0.036...
[ 3642, 47, 15504, 14012, 1295, 25072, 3173, 3934, 142, 892, 1505, 23, 502, 4867, 39457, 42, 8962, 18, 304, 32166, 541, 5759, 13579, 4288, 1919, 18151, 45831, 91, 177609, 903, 116, 37842, 3249, 39531, 5281, 11389, 48502, 71407, 33079, 7, ...
[ 0.0843505859375, 0.074951171875, 0.166259765625, 0.205078125, 0.1348876953125, 0.2105712890625, 0.213623046875, 0.1026611328125, 0.06317138671875, 0.149658203125, 0.1978759765625, 0.04901123046875, 0.1531982421875, 0.2427978515625, 0.120361328125, 0.02447509765625, 0.0198211669921875...
embed
56776876_c0
56776876
prolog
0
Title: SWI Prolog, CLP(R): Can I bind a constraint to a variable? Problem title: SWI Prolog, CLP(R): Can I bind a constraint to a variable? Tags: clpr, prolog, swi-prolog Problem: SWI Prolog, CLP(R): Can I bind a constraint to a variable? Or can a constraint variable be bound to another variable (see the example below)...
SWI Prolog, CLP(R): Can I bind a constraint to a variable? SWI Prolog, CLP(R): Can I bind a constraint to a variable? clpr prolog swi-prolog SWI Prolog CLP Can use_module term_variables SWI Prolog, CLP(R): Can I bind a constraint to a variable? Or can a constraint variable be bound to another variable (see the example ...
[ 0.009521484375, 0.01458740234375, 0.0203857421875, 0.0140380859375, 0.01123046875, 0.00750732421875, 0.024169921875, -0.006500244140625, 0.02197265625, -0.03515625, -0.0130615234375, 0.0084228515625, -0.001312255859375, 0.0146484375, 0.0103759765625, 0.01806640625, -0.006072998046875...
[ 159, 38969, 1250, 4867, 37352, 1052, 4171, 87, 68557, 158, 2816, 4288, 47, 77336, 10, 33139, 10287, 502, 2452, 3454, 4527, 83279, 13579, 21690, 19736, 831, 186, 99091, 15700, 27781, 35064 ]
[ 0.02618408203125, 0.214599609375, 0.1248779296875, 0.2073974609375, 0.203125, 0.081298828125, 0.10614013671875, 0.04095458984375, 0.235595703125, 0.0946044921875, 0.1898193359375, 0.150390625, 0.1263427734375, 0.249755859375, 0.00921630859375, 0.00335693359375, 0.13330078125, 0.060...
embed
5501518_c0
5501518
prolog
0
Title: I don&#x27;t think I get Prolog&#x27;s recursion Problem title: I don&#x27;t think I get Prolog&#x27;s recursion Tags: prolog Problem: I don't think I get Prolog's recursion foo/3 is a predicate that does something with two lists and outputs another one. foo([], Ys, Zs) :- append(Zs, Ys, Final), write(Final), % ...
I don&#x27;t think I get Prolog&#x27;s recursion I don&#x27;t think I get Prolog&#x27;s recursion prolog Prolog Final NewYs NewZs Exit I don't think I get Prolog's recursion foo/3 is a predicate that does something with two lists and outputs another one. I want the Final to be the L in the top-level call like foo([1,2,...
[ 0.01031494140625, 0.0172119140625, -0.004974365234375, -0.00921630859375, -0.0098876953125, 0.0022735595703125, -0.00445556640625, -0.00109100341796875, 0.0069580078125, 0.005035400390625, 0.028564453125, -0.003173828125, -0.0247802734375, 0.00439453125, 0.01409912109375, -0.0103149414...
[ 2301, 3768, 18, 5351, 87, 2046, 1250, 4867, 195625, 1830, 502, 27188, 2356, 1723, 1511, 5443, 217, 7, 5775, 31, 18113, 83, 1653, 2063, 67, 14602, 6626, 5303, 140992, 15700, 1632, 3444, 186, 70, 339, 2663, 67919, 11782, 1884, 133063, 963...
[ 0.050994873046875, 0.077880859375, 0.08001708984375, 0.124267578125, 0.019134521484375, 0.1143798828125, 0.1912841796875, 0.254638671875, 0.2374267578125, 0.1392822265625, 0.1494140625, 0.25244140625, 0.0810546875, 0.046783447265625, 0.07586669921875, 0.1197509765625, 0.0738525390625...
embed
58784651_c0
58784651
prolog
0
Title: Why does Prolog find to many solutions when filtering a list? Problem title: Why does Prolog find to many solutions when filtering a list? Tags: prolog Problem: Why does Prolog find to many solutions when filtering a list? I have written a predicate which filters a list of all numbers below 6, but prolog finds m...
Why does Prolog find to many solutions when filtering a list? Why does Prolog find to many solutions when filtering a list? prolog Why Prolog Res Why does Prolog find to many solutions when filtering a list? I have written a predicate which filters a list of all numbers below 6, but prolog finds more than one solution....
[ 0.0155029296875, 0.010498046875, 0.005859375, -0.007354736328125, 0.005950927734375, -0.00244140625, 0.0023345947265625, 0.0120849609375, 0.01043701171875, -0.0238037109375, 0.015869140625, -0.0240478515625, -0.0167236328125, 0.01416015625, 0.0206298828125, 0.0005645751953125, 0.0463...
[ 44084, 14602, 1250, 4867, 7413, 47, 5941, 51347, 3229, 46312, 214, 5303, 502, 9624, 1653, 2063, 67, 756, 101935, 35064, 305, 1284, 1286, 3501, 1632, 29806, 33342, 113292, 903, 705, 78, 2480, 361, 116, 702, 1193, 50339, 4734, 84751, 2203, ...
[ 0.15087890625, 0.03973388671875, 0.2001953125, 0.262939453125, 0.153564453125, 0.1597900390625, 0.1881103515625, 0.2191162109375, 0.048858642578125, 0.2086181640625, 0.0716552734375, 0.162841796875, 0.1414794921875, 0.1483154296875, 0.0838623046875, 0.1251220703125, 0.039642333984375...
embed
69535219_c0
69535219
prolog
0
Title: How do I write a predicate that converts terms to lists? Problem title: How do I write a predicate that converts terms to lists? Tags: prolog Problem: How do I write a predicate that converts terms to lists? I have to implement the predicate next(Integer, List) that will take a list represented as terms next(int...
How do I write a predicate that converts terms to lists? How do I write a predicate that converts terms to lists? prolog How Integer List Head Tail How do I write a predicate that converts terms to lists? I have to implement the predicate next(Integer, List) that will take a list represented as terms next(int,List) , a...
[ 0.00518798828125, 0.012451171875, -0.006866455078125, 0.0225830078125, -0.01287841796875, 0.037841796875, 0.006805419921875, 0.00157928466796875, -0.002777099609375, -0.0257568359375, 0.00933837890625, -0.00244140625, -0.0115966796875, 0.003662109375, 0.00518798828125, 0.02294921875, ...
[ 11249, 87, 33022, 1653, 2063, 67, 450, 96760, 7, 69407, 47, 5303, 54, 10, 502, 4867, 44401, 32036, 44816, 1218, 379, 29479, 11737, 4153, 1505, 5646, 33636, 237, 4288, 154663, 13025, 712, 58745, 9874, 130877, 31577, 136993, 4358, 3642, 173...
[ 0.08013916015625, 0.016845703125, 0.184326171875, 0.19482421875, 0.2242431640625, 0.153076171875, 0.0274200439453125, 0.1646728515625, 0.06793212890625, 0.2366943359375, 0.11279296875, 0.2371826171875, 0.0257110595703125, 0.00579833984375, 0.0809326171875, 0.1304931640625, 0.17175292...
embed
53075036_c0
53075036
prolog
0
Title: How not to show if there is same result occurs more than once- Prolog Problem title: How not to show if there is same result occurs more than once- Prolog Tags: swi-prolog, prolog Problem: How not to show if there is same result occurs more than once- Prolog Scenario I have the code as below. My question is how ...
How not to show if there is same result occurs more than once- Prolog How not to show if there is same result occurs more than once- Prolog swi-prolog prolog How Prolog How not to show if there is same result occurs more than once- Prolog Scenario I have the code as below. My question is how to don't show appearing sam...
[ 0.00982666015625, 0.0203857421875, 0.0263671875, -0.00494384765625, 0.01055908203125, 0.002349853515625, -0.001190185546875, -0.00102996826171875, 0.002197265625, -0.005615234375, -0.0162353515625, -0.00106048583984375, -0.0001468658447265625, -0.007537841796875, -0.00145721435546875, ...
[ 11249, 959, 47, 7639, 2174, 2685, 83, 5701, 16750, 74918, 1286, 3501, 24145, 1250, 4867, 2452, 3454, 502, 152365, 6723, 18151, 35064, 3642, 2301, 18, 108975, 214, 114063, 13538, 3871, 140992, 186, 21441, 1577, 3398, 2528, 434, 19364, 438, ...
[ 0.06976318359375, 0.1651611328125, 0.053680419921875, 0.196044921875, 0.104248046875, 0.0858154296875, 0.046630859375, 0.1922607421875, 0.194580078125, 0.1793212890625, 0.155029296875, 0.150390625, 0.2132568359375, 0.1434326171875, 0.2373046875, 0.134765625, 0.07550048828125, 0.073...
embed
35526384_c0
35526384
prolog
0
Title: Check if any element&#x27;s frequency is above a limit Problem title: Check if any element&#x27;s frequency is above a limit Tags: list, prolog-dif, prolog Problem: Check if any element's frequency is above a limit I want to solve a problem that is I have a Prolog list of elements. If the any of the element freq...
Check if any element&#x27;s frequency is above a limit Check if any element&#x27;s frequency is above a limit list prolog-dif prolog Check Check if any element's frequency is above a limit I want to solve a problem that is I have a Prolog list of elements. If the any of the element frequency is greater than N then fals...
[ 0.00970458984375, 0.01220703125, 0.0021820068359375, -0.01513671875, 0.000579833984375, -0.00927734375, 0.0078125, 0.005157470703125, 0.00885009765625, -0.006866455078125, 0.008544921875, -0.0130615234375, 0.010498046875, 0.009765625, 0.007232666015625, -0.01495361328125, 0.006347656...
[ 38679, 2174, 2499, 12830, 3768, 12478, 944, 27771, 83, 36917, 10, 17475, 5303, 502, 4867, 428, 420, 3444, 86869, 2967, 1250, 80854, 4263, 117396, 3501, 541, 98320, 30646, 41206, 1884, 35064, 18151, 2046, 17311, 6528 ]
[ 0.2017822265625, 0.111083984375, 0.037567138671875, 0.23779296875, 0.06793212890625, 0.2113037109375, 0.19482421875, 0.13525390625, 0.098388671875, 0.211181640625, 0.046478271484375, 0.230712890625, 0.1749267578125, 0.10791015625, 0.197509765625, 0.06671142578125, 0.1141357421875, ...
embed
61879888_c0
61879888
prolog
0
Title: SWI-Prolog partition predicate works differently in REPL than in programme Problem title: SWI-Prolog partition predicate works differently in REPL than in programme Tags: quicksort, prolog, higher-order-functions Problem: SWI-Prolog partition predicate works differently in REPL than in programme main :- length(L...
SWI-Prolog partition predicate works differently in REPL than in programme SWI-Prolog partition predicate works differently in REPL than in programme quicksort prolog higher-order-functions SWI-Prolog REPL SWI-Prolog partition predicate works differently in REPL than in programme I imlemented quicksort using SWISH this...
[ -0.0006561279296875, 0.004638671875, 0.001617431640625, -0.0152587890625, -0.029541015625, -0.00078582763671875, 0.01324462890625, -0.0174560546875, -0.0068359375, -0.00262451171875, 0.01019287109375, 0.034912109375, -0.009521484375, -0.005859375, 0.025634765625, -0.0213623046875, 0....
[ 159, 38969, 10752, 4867, 2878, 1363, 1653, 2063, 67, 43240, 12921, 23, 9069, 21130, 3501, 26693, 63773, 62351, 502, 77546, 80596, 137175, 566, 19929, 17368, 61595, 79909, 3917, 22027, 4488, 26785, 107730, 140992, 5303, 5701, 11675, 2685, 7108...
[ 0.038543701171875, 0.224853515625, 0.1434326171875, 0.2000732421875, 0.1966552734375, 0.07525634765625, 0.156982421875, 0.1842041015625, 0.039703369140625, 0.1287841796875, 0.16455078125, 0.04144287109375, 0.1251220703125, 0.269775390625, 0.035430908203125, 0.183349609375, 0.12377929...
embed
20081912_c0
20081912
prolog
0
Title: Rotating a list to the right (Prolog) Problem title: Rotating a list to the right (Prolog) Tags: list, prolog Problem: Rotating a list to the right (Prolog) I have an assignment where I need to rotate a list once to the right. I also have a constraint where I can only use one predicate. It seems that shifting to...
Rotating a list to the right (Prolog) Rotating a list to the right (Prolog) list prolog Rotating Prolog Rotating a list to the right (Prolog) I have an assignment where I need to rotate a list once to the right. I also have a constraint where I can only use one predicate. It seems that shifting to the left is very easy...
[ 0.01519775390625, 0.0211181640625, 0.0400390625, -0.015625, -0.0098876953125, 0.00390625, -0.0235595703125, 0.00518798828125, -0.0135498046875, -0.0169677734375, 0.00604248046875, -0.00653076171875, -0.011474609375, 0.0106201171875, -0.0021209716796875, 0.018798828125, 0.010498046875...
[ 146283, 1916, 5303, 47, 70, 7108, 10752, 4867, 502, 1250, 95486, 674, 3871, 47014, 67, 10, 24145, 158, 2816, 4288, 831, 4734, 4527, 1632, 1653, 2063, 1650, 37202, 122925, 214, 25737, 4552, 23468, 442, 182, 820, 48762, 13695, 81887, 360, ...
[ 0.226318359375, 0.09429931640625, 0.2166748046875, 0.1605224609375, 0.095458984375, 0.252685546875, 0.1212158203125, 0.19384765625, 0.1051025390625, 0.1414794921875, 0.1329345703125, 0.0176544189453125, 0.0347900390625, 0.2137451171875, 0.115478515625, 0.015533447265625, 0.1170654296...
embed
26593440_c0
26593440
prolog
0
Title: Prolog: won&#x27;t get the biggest element Problem title: Prolog: won&#x27;t get the biggest element Tags: prolog, list Problem: Prolog: won't get the biggest element I'm learning prolog but I'm having some difficulties with learning it. I have an query that goes through a list of elements each with each own ele...
Prolog: won&#x27;t get the biggest element Prolog: won&#x27;t get the biggest element prolog list Prolog Tail Prolog: won't get the biggest element I'm learning prolog but I'm having some difficulties with learning it. I have an query that goes through a list of elements each with each own element and value and I'm try...
[ 0.00836181640625, 0.016845703125, 0.00860595703125, -0.0036163330078125, -0.006011962890625, 0.0172119140625, 0.007110595703125, -0.01953125, 0.009521484375, 0.0027923583984375, 0.0174560546875, -0.01507568359375, -0.021484375, -0.033203125, 0.0023193359375, -0.00518798828125, 0.0212...
[ 1250, 4867, 23742, 3768, 18, 2046, 129058, 12830, 502, 5303, 1218, 379, 70, 52080, 34844, 41, 1294, 8305, 80854, 12638, 10002, 34292, 31577, 678, 7225, 140992, 5608, 186, 748, 1193, 876, 18151, 28960, 77947 ]
[ 0.150146484375, 0.2529296875, 0.10205078125, 0.05865478515625, 0.1131591796875, 0.1207275390625, 0.207275390625, 0.2244873046875, 0.113037109375, 0.11572265625, 0.0906982421875, 0.10986328125, 0.024566650390625, 0.0711669921875, 0.052947998046875, 0.074951171875, 0.08154296875, 0.0...
embed
9059992_c0
9059992
prolog
0
Title: prolog SWI shell issues Problem title: prolog SWI shell issues Tags: function, prolog Problem: prolog SWI shell issues I am trying to get my feet wet with some Prolog, as I have a project due in it relatively soon. How would I do something simple such as displaying some output text to the console? I am using the...
prolog SWI shell issues prolog SWI shell issues function prolog SWI write_to_screen Hello World prolog SWI shell issues I am trying to get my feet wet with some Prolog, as I have a project due in it relatively soon. How would I do something simple such as displaying some output text to the console? I am using the SWI s...
[ 0.021484375, 0.007232666015625, -0.0164794921875, 0.0247802734375, -0.0311279296875, -0.006622314453125, -0.00543212890625, -0.004241943359375, -0.01953125, -0.0177001953125, 0.00035858154296875, -0.01348876953125, -0.004913330078125, -0.007415771484375, 0.031982421875, -0.012573242187...
[ 502, 4867, 159, 38969, 128019, 37348, 32354, 33022, 188, 86667, 35378, 6661, 31577, 74261, 36311, 1250, 13452, 4743, 33662, 2806, 54, 8781, 44116, 140992, 7986, 130250, 81887, 75463, 3454, 11435, 33342, 9790, 36880, 9969, 1340, 18499, 11782, ...
[ 0.1146240234375, 0.198486328125, 0.068603515625, 0.2467041015625, 0.2349853515625, 0.1971435546875, 0.135498046875, 0.1871337890625, 0.1156005859375, 0.1851806640625, 0.0899658203125, 0.0911865234375, 0.05535888671875, 0.0263671875, 0.08642578125, 0.1181640625, 0.0692138671875, 0.0...
embed
65422556_c0
65422556
prolog
0
Title: heapify prolog implementation Problem title: heapify prolog implementation Tags: prolog, heap Problem: heapify prolog implementation I'm testing my heapify in prolog but it doesn't work as i expected. In particular it miss some elements i think and it doesn't generate a correct heap. min_heapify(H, P) :- heap_ha...
heapify prolog implementation heapify prolog implementation prolog heap min_heapify heap_has_size heap_entry _V1 _V2 heapify prolog implementation I'm testing my heapify in prolog but it doesn't work as i expected. In particular it miss some elements i think and it doesn't generate a correct heap.
[ 0.01287841796875, 0.0021514892578125, 0.00714111328125, -0.01312255859375, 0.0027313232421875, 0.0157470703125, -0.01348876953125, -0.004669189453125, 0.00592041015625, -0.01434326171875, 0.012451171875, 0.0018768310546875, 0.015625, 0.01104736328125, 0.02294921875, -0.002044677734375,...
[ 764, 2631, 40383, 502, 4867, 208124, 881, 1106, 10557, 62539, 33, 15123, 856, 418, 304, 134234, 22027, 18, 4488, 237, 84751, 17311, 18025, 80854, 5351, 139392, 26785 ]
[ 0.1966552734375, 0.20068359375, 0.2469482421875, 0.1400146484375, 0.220703125, 0.1397705078125, 0.178955078125, 0.13671875, 0.0655517578125, 0.1207275390625, 0.081298828125, 0.09912109375, 0.1143798828125, 0.0257568359375, 0.045166015625, 0.1409912109375, 0.0242462158203125, 0.0533...
embed
2151971_c0
2151971
prolog
0
Title: Translate Prolog Words Problem title: Translate Prolog Words Tags: prolog Problem: Translate Prolog Words I'm working on this this wonderful Prolog project and I'm stuck at this situation where I need to translate certain words into other words (e.g "i" into "you". "my into "your") This is what I've done and I'm...
Translate Prolog Words Translate Prolog Words prolog Translate Prolog Words NewH NewT Translate Prolog Words I'm working on this this wonderful Prolog project and I'm stuck at this situation where I need to translate certain words into other words (e.g "i" into "you". "my into "your") This is what I've done and I'm pre...
[ 0.00811767578125, -0.002716064453125, -0.00390625, 0.002899169921875, -0.0014190673828125, 0.0140380859375, -0.015380859375, 0.00164031982421875, 0.00848388671875, -0.026611328125, 0.0005645751953125, 0.00164794921875, -0.00055694580078125, -0.0208740234375, -0.00063323974609375, 0.005...
[ 11062, 19309, 1250, 4867, 22543, 7, 502, 2356, 841, 618, 20697, 903, 58867, 13452, 179933, 99, 16648, 3871, 3900, 24233, 34153, 3934, 3789, 14, 53927, 1176, 154176, 16940, 28875, 9077, 442, 8562, 17, 76195, 30957, 149357, 1650, 60899, 96760...
[ 0.19189453125, 0.2073974609375, 0.200439453125, 0.252197265625, 0.1904296875, 0.013946533203125, 0.1497802734375, 0.1175537109375, 0.1290283203125, 0.13525390625, 0.077392578125, 0.027130126953125, 0.073486328125, 0.061248779296875, 0.1165771484375, 0.006591796875, 0.0877685546875, ...
embed
79249342_c1
79249342
prolog
1
(1, 2)] ; Tokens = [mul(123, 456), mul(1, 2)] ; Tokens = [mul(123, 456), mul(1, 2)] ; Tokens = [mul(123, 456), mul(1, 2)] ; Tokens = [mul(123, 456)] ; -- Incorrect Tokens = [mul(1, 2)] ; -- Incorrect false. I can use the cut to stop at the first solution, but is there a way to express not_token in DCG so that it only r...
(1, 2)] ; Tokens = [mul(123, 456), mul(1, 2)] ; Tokens = [mul(123, 456), mul(1, 2)] ; Tokens = [mul(123, 456), mul(1, 2)] ; Tokens = [mul(123, 456)] ; -- Incorrect Tokens = [mul(1, 2)] ; -- Incorrect false. I can use the cut to stop at the first solution, but is there a way to express not_token in DCG so that it only r...
[ 0.005706787109375, 0.0159912109375, 0.01171875, 0.0244140625, -0.01434326171875, 0.01165771484375, -0.01141357421875, -0.0245361328125, 0.0084228515625, -0.0186767578125, -0.018798828125, 0.000009417533874511719, -0.005157470703125, 0.01611328125, 0.024169921875, -0.01300048828125, 0...
[ 2858, 4958, 717, 84694, 2203, 15458, 48636, 201, 74757, 16690, 360, 32399, 15390, 98320, 831, 4527, 59226, 47, 7279, 99, 5117, 29806, 3917, 36510, 959, 454, 6448, 33, 23, 391, 56367, 4734, 30646, 26785, 16750, 96704, 3034, 20653, 93967, 4...
[ 0.032623291015625, 0.1146240234375, 0.144287109375, 0.219482421875, 0.00653076171875, 0.1307373046875, 0.1678466796875, 0.021484375, 0.147705078125, 0.1484375, 0.050384521484375, 0.1627197265625, 0.086181640625, 0.17041015625, 0.05181884765625, 0.0728759765625, 0.2052001953125, 0.0...
embed
28972038_c0
28972038
prolog
0
Title: Prolog. Structure(complex term) vs predicate, i dont really get the difference Problem title: Prolog. Structure(complex term) vs predicate, i dont really get the difference Tags: prolog Problem: Prolog. Structure(complex term) vs predicate, i dont really get the difference I'm new to prolog and i cant seem to un...
Prolog. Structure(complex term) vs predicate, i dont really get the difference Prolog. Structure(complex term) vs predicate, i dont really get the difference prolog Prolog Structure Prolog. Structure(complex term) vs predicate, i dont really get the difference I'm new to prolog and i cant seem to understand the differe...
[ 0.0242919921875, 0.0150146484375, 0.00070953369140625, 0.00933837890625, 0.00823974609375, 0.03662109375, 0.033935546875, 0.00616455078125, 0.0111083984375, -0.019287109375, 0.02001953125, 0.01275634765625, 0.0052490234375, -0.00032806396484375, 0.00640869140625, 0.004302978515625, -...
[ 1250, 4867, 63667, 238, 6644, 277, 44974, 13579, 20209, 1653, 2063, 67, 13319, 6183, 2046, 60212, 17, 70, 502, 3525, 45767, 28219, 17721, 45646, 136, 10, 2499, 16916, 1238, 1542, 11, 186, 55, 7779, 1723, 25003, 1511, 5161, 27140, 10660, ...
[ 0.16650390625, 0.232666015625, 0.2015380859375, 0.1636962890625, 0.148681640625, 0.0653076171875, 0.1861572265625, 0.202392578125, 0.115234375, 0.181640625, 0.2265625, 0.1259765625, 0.09149169921875, 0.05999755859375, 0.08197021484375, 0.1947021484375, 0.027008056640625, 0.00482177...
embed
19178056_c0
19178056
prolog
0
Title: Sgml returns some warnings Problem title: Sgml returns some warnings Tags: sgml, prolog, html Problem: Sgml returns some warnings I use the sgml library of prolog to extract information about a web page. I use this instruction to extract all: load_structure('file.html', List, [dialect(sgml), shorttag(false), max...
Sgml returns some warnings Sgml returns some warnings sgml prolog html Sgml load_structure file.html List max_errors WARNING:SGML2PL Sgml returns some warnings I use the sgml library of prolog to extract information about a web page. I use this instruction to extract all: the system loads the page but i have some warni...
[ 0.002197265625, 0.01055908203125, 0.014404296875, -0.010986328125, -0.0028839111328125, 0.030517578125, -0.0250244140625, 0.01312255859375, 0.0010986328125, -0.0223388671875, 0.0018768310546875, 0.00970458984375, -0.0235595703125, -0.01251220703125, 0.0174560546875, 0.0234375, 0.0158...
[ 159, 177, 7237, 30646, 3060, 1631, 6977, 93170, 502, 4867, 7693, 72367, 137656, 11435, 32036, 18389, 188800, 60873, 25795, 74322, 39456, 304, 21130, 4527, 35773, 1294, 125663, 4677, 1467, 9191, 188336, 756, 5426, 27169, 67 ]
[ 0.041473388671875, 0.08642578125, 0.2548828125, 0.1561279296875, 0.07379150390625, 0.1695556640625, 0.115966796875, 0.1177978515625, 0.130126953125, 0.182861328125, 0.1279296875, 0.1324462890625, 0.14794921875, 0.070068359375, 0.06182861328125, 0.14208984375, 0.1845703125, 0.093383...
embed
8297031_c0
8297031
prolog
0
Title: Want to print the path,but getting errors Problem title: Want to print the path,but getting errors Tags: turbo-prolog, prolog Problem: Want to print the path,but getting errors domains list=symbol* predicates path(symbol,symbol) solve(symbol,symbol,list) insert(symbol,list,list) clauses path(a,b). path(b,c). pat...
Want to print the path,but getting errors Want to print the path,but getting errors turbo-prolog prolog Want Temp Tail Tail1 Want to print the path,but getting errors Want to print the path which i have followed in going from one point to another.But getting errors.For examples, i want: Answer:P=[a,b,c]
[ 0.01324462890625, -0.0002231597900390625, 0.010009765625, 0.0203857421875, -0.032958984375, 0.0294189453125, -0.033203125, -0.0245361328125, 0.00872802734375, -0.025634765625, 0.0103759765625, -0.00390625, 0.00146484375, 0.00006341934204101562, -0.005157470703125, 0.0125732421875, -0...
[ 42335, 28412, 70, 60875, 8789, 20949, 18499, 7, 47, 94779, 9, 3454, 4867, 502, 37446, 1218, 379, 418, 765, 134629, 7730, 1295, 6275, 15700, 82212, 27781, 3444, 130373, 683, 1369, 11, 275, 238 ]
[ 0.113037109375, 0.2208251953125, 0.06036376953125, 0.261474609375, 0.0933837890625, 0.08056640625, 0.2215576171875, 0.056915283203125, 0.048553466796875, 0.18505859375, 0.010406494140625, 0.10595703125, 0.1661376953125, 0.1038818359375, 0.171142578125, 0.13037109375, 0.1263427734375,...
embed
36088004_c0
36088004
prolog
0
Title: Get all the predicates that are verb and are a predicate Problem title: Get all the predicates that are verb and are a predicate Tags: prolog, metaprogramming Problem: Get all the predicates that are verb and are a predicate I have in a .pl file the follow: ... verb(love). verb(think). love(mom, dad). noun(head)...
Get all the predicates that are verb and are a predicate Get all the predicates that are verb and are a predicate prolog metaprogramming Get Pre Param current_predicate Result Get all the predicates that are verb and are a predicate I have in a .pl file the follow: I want to get all the predicates that are verb and are...
[ -0.01275634765625, -0.0155029296875, 0.0155029296875, 0.017822265625, 0.01153564453125, 0.02587890625, -0.003387451171875, -0.005401611328125, 0.010009765625, -0.07763671875, 0.02587890625, -0.0054931640625, -0.0228271484375, -0.01611328125, -0.0023956298828125, 0.02392578125, 0.0044...
[ 20779, 756, 1653, 2063, 1636, 450, 621, 42792, 136, 10, 67, 502, 4867, 23550, 28966, 1914, 1720, 39, 43581, 19714, 126684, 70, 5, 2424, 11435, 28960, 3444, 2046, 187, 2481, 116, 13538, 7077 ]
[ 0.08685302734375, 0.0780029296875, 0.19921875, 0.220703125, 0.1497802734375, 0.015472412109375, 0.04937744140625, 0.241455078125, 0.0823974609375, 0.04425048828125, 0.091552734375, 0.1209716796875, 0.1658935546875, 0.125, 0.125, 0.0966796875, 0.05804443359375, 0.019561767578125, ...
embed
37457295_c0
37457295
prolog
0
Title: Minimal Herbrand model Problem title: Minimal Herbrand model Tags: prolog Problem: Minimal Herbrand model Given the following prolog program: way(a,b,c). way(a,d,e). way(b,f,g). way(f,h,i). way(h,j,k). way(l,j,m). reachable(a, []). reachable(X, [W|WS]) :- reachable(Y, WS), way(Y,X,W). What is the minimal herbran...
Minimal Herbrand model Minimal Herbrand model prolog Minimal Herbrand I_0 I_1 T_P I_2 Minimal Herbrand model Given the following prolog program: What is the minimal herbrand model using T-operator? Let I be an interpretation, then: But now I don't know how to continue. Can anyone please help?
[ -0.01446533203125, -0.00616455078125, -0.007568359375, 0.047119140625, -0.01275634765625, 0.0025482177734375, 0.00518798828125, 0.003631591796875, -0.008056640625, -0.0546875, 0.00921630859375, -0.0177001953125, -0.01153564453125, 0.01104736328125, -0.0047607421875, 0.019287109375, -...
[ 119305, 1840, 43264, 3299, 502, 4867, 2389, 115187, 384, 683, 1528, 4865, 83, 70, 20187, 604, 17368, 9, 206469, 206019, 3714, 3642, 47, 21342, 22936, 4358 ]
[ 0.219970703125, 0.1514892578125, 0.230712890625, 0.2181396484375, 0.1156005859375, 0.1715087890625, 0.038482666015625, 0.037384033203125, 0.1630859375, 0.034637451171875, 0.10675048828125, 0.03253173828125, 0.040863037109375, 0.0026874542236328125, 0.2305908203125, 0.13525390625, 0.0...
embed
13257058_c1
13257058
prolog
1
run backwards (give it a C statement (3+5) and translate back to english (add 3 to 5)). That part I don't really have an idea for at all. EDIT: There's a large enough permutations of possible English notations that I can't just pattern match everything. I get the idea that what I need to do is match the first operator...
run backwards (give it a C statement (3+5) and translate back to english (add 3 to 5)). That part I don't really have an idea for at all. EDIT: There's a large enough permutations of possible English notations that I can't just pattern match everything. I get the idea that what I need to do is match the first operator...
[ 0.032470703125, 0.01708984375, 0.0037994384765625, 0.0235595703125, -0.00543212890625, 0.020263671875, -0.0103759765625, 0.006805419921875, 0.000530242919921875, -0.03076171875, -0.0242919921875, 0.00732421875, 0.008056640625, -0.0027008056640625, -0.0031280517578125, 0.006561279296875...
[ 11675, 4420, 19364, 7, 96259, 313, 63805, 6896, 131815, 3900, 19309, 47, 175457, 4028, 138, 21162, 2831, 6183, 765, 6528, 14311, 7722, 14941, 959, 21094, 103510, 14858, 26818, 3871, 54, 5117, 39933, 42518, 8962, 282, 26582, 7413, 6264, 2208...
[ 0.19921875, 0.1910400390625, 0.2322998046875, 0.0718994140625, 0.0416259765625, 0.07489013671875, 0.2076416015625, 0.0848388671875, 0.275146484375, 0.130126953125, 0.1280517578125, 0.07452392578125, 0.145263671875, 0.08197021484375, 0.1419677734375, 0.13134765625, 0.0882568359375, ...
embed
19740850_c0
19740850
prolog
0
Title: create a matrix and permutate each line Problem title: create a matrix and permutate each line Tags: prolog, latin-square, matrix, permutation Problem: create a matrix and permutate each line i can create a list from 0 to N and permutation it. But how can i make it into matrix and permutation each line just from...
create a matrix and permutate each line create a matrix and permutate each line prolog latin-square matrix permutation do_list do_list1 N-1 create a matrix and permutate each line i can create a list from 0 to N and permutation it. But how can i make it into matrix and permutation each line just from matrix(2,L) .
[ 0.0062255859375, 0.004791259765625, 0.0159912109375, -0.0096435546875, -0.007537841796875, -0.0037384033203125, -0.01263427734375, 0.00860595703125, 0.00616455078125, -0.033935546875, -0.00421142578125, -0.008056640625, 0.011474609375, -0.002838134765625, -0.0291748046875, 0.0169677734...
[ 28282, 10, 50944, 425, 136, 117, 68754, 13, 12638, 13315, 502, 4867, 45137, 108047, 561, 22062, 54, 6562, 418, 541, 5759, 17, 831, 5303, 1295, 757, 47, 442, 4966, 3642, 3249, 3934, 1660, 54753, 4, 866, 5 ]
[ 0.1590576171875, 0.06964111328125, 0.236572265625, 0.16162109375, 0.10064697265625, 0.162353515625, 0.2305908203125, 0.1094970703125, 0.1368408203125, 0.19775390625, 0.09423828125, 0.1290283203125, 0.178955078125, 0.1295166015625, 0.18359375, 0.138916015625, 0.1148681640625, 0.1822...
embed
35391396_c1
35391396
prolog
1
over here (idents_types) | ?- phrase(idents_types(L),"struct(aa:STRING)"). ! Resource error: insufficient memory Expected result | ?- type('ZZ*struct(p1:STRING,p2:PP(STRING),p3:(BOOL*PP(STRING)),p4:PP(personne*BOOL))'). p1-STRING STRING p2-PP(STRING) STRING p3-(BOOL*PP(STRING)) STRING BOOL p4-PP(personne*BOOL) BOOL pe...
over here (idents_types) | ?- phrase(idents_types(L),"struct(aa:STRING)"). ! Resource error: insufficient memory Expected result | ?- type('ZZ*struct(p1:STRING,p2:PP(STRING),p3:(BOOL*PP(STRING)),p4:PP(personne*BOOL))'). p1-STRING STRING p2-PP(STRING) STRING p3-(BOOL*PP(STRING)) STRING BOOL p4-PP(personne*BOOL) BOOL pe...
[ -0.003265380859375, 0.008544921875, -0.0230712890625, 0.033935546875, -0.0074462890625, -0.004150390625, 0.007110595703125, -0.0025634765625, 0.016357421875, -0.044677734375, 0.00653076171875, -0.006927490234375, -0.00115966796875, -0.0242919921875, 0.021240234375, 0.047119140625, -0...
[ 645, 3688, 52128, 7, 50986, 705, 113860, 866, 36716, 11, 8545, 90345, 711, 152055, 18499, 23, 129980, 98323, 60075, 13, 89829, 16750, 10644, 76362, 254, 82825, 4, 12, 17487, 363, 571, 137142, 617, 30816, 86, 46549, 23186, 335, 35748, 2493...
[ 0.2305908203125, 0.2490234375, 0.2078857421875, 0.0751953125, 0.2286376953125, 0.016021728515625, 0.1944580078125, 0.0999755859375, 0.1810302734375, 0.092041015625, 0.0254974365234375, 0.192626953125, 0.0458984375, 0.243408203125, 0.2113037109375, 0.1004638671875, 0.2484130859375, ...
embed
14793013_c0
14793013
prolog
0
Title: finding the distance between two cities Problem title: finding the distance between two cities Tags: prolog Problem: finding the distance between two cities I am working on a problem involving a list of cities and finding which is the closest to a designated one in Prolog. For example if I want to find the close...
finding the distance between two cities finding the distance between two cities prolog V1-V2 H1-H2 finding the distance between two cities I am working on a problem involving a list of cities and finding which is the closest to a designated one in Prolog. For example if I want to find the closest city to seattle from t...
[ 0.016357421875, -0.013916015625, -0.0029754638671875, 0.012939453125, 0.01171875, 0.004180908203125, -0.0022735595703125, 0.00390625, 0.0096435546875, -0.042236328125, 0.0113525390625, -0.01336669921875, 0.000286102294921875, -0.0341796875, -0.017578125, -0.00518798828125, 0.00659179...
[ 90791, 70, 62488, 17721, 6626, 162708, 502, 4867, 310, 20268, 856, 304, 572, 841, 20697, 2967, 5303, 20903, 271, 47, 4331, 27686, 1632, 23, 1250, 3444, 7413, 26349, 15520, 46401, 2053, 5423, 1653, 2063, 67, 12477, 13204, 449, 4527, 5584, ...
[ 0.115234375, 0.0777587890625, 0.2196044921875, 0.15869140625, 0.1103515625, 0.177978515625, 0.10498046875, 0.2066650390625, 0.1005859375, 0.038970947265625, 0.0943603515625, 0.10357666015625, 0.055145263671875, 0.065673828125, 0.0491943359375, 0.0775146484375, 0.077392578125, 0.172...
embed
13518232_c0
13518232
prolog
0
Title: Context Free Grammars to Prolog? Problem title: Context Free Grammars to Prolog? Tags: grammar, dcg, prolog Problem: Context Free Grammars to Prolog? From your knowledge of translation and Type 2 grammars, recall example , defined as follows: G = {N, T, S, P} T = {x, y, z} N = {A, B, C} S = A P = < A> ::= x<B> <...
Context Free Grammars to Prolog? Context Free Grammars to Prolog? grammar dcg prolog Context Free Grammars Prolog Context Free Grammars to Prolog? From your knowledge of translation and Type 2 grammars, recall example , defined as follows: Write Prolog rules to represent this grammar. Test with the following lists: Can...
[ 0.037353515625, 0.00982666015625, 0.01300048828125, 0.0184326171875, -0.007598876953125, 0.02001953125, -0.01495361328125, 0.0079345703125, -0.00830078125, -0.0224609375, 0.005706787109375, -0.021240234375, -0.01068115234375, 0.0036163330078125, 0.002197265625, 0.0074462890625, 0.007...
[ 1657, 22829, 5153, 48078, 1727, 7, 47, 1250, 4867, 122092, 147, 177, 502, 153648, 60457, 116, 21816, 189232, 27781, 61924, 18781, 91736, 33636, 903, 8647, 5303, 4358, 12921 ]
[ 0.0660400390625, 0.191162109375, 0.15966796875, 0.119140625, 0.1436767578125, 0.05999755859375, 0.1024169921875, 0.1561279296875, 0.234130859375, 0.13232421875, 0.1031494140625, 0.041717529296875, 0.1109619140625, 0.10296630859375, 0.1102294921875, 0.08770751953125, 0.010772705078125...
embed
30110635_c0
30110635
prolog
0
Title: How to print a countdown from a given number including the negative copies from the user in Prolog? Problem title: How to print a countdown from a given number including the negative copies from the user in Prolog? Tags: list, countdown, prolog Problem: How to print a countdown from a given number including the ...
How to print a countdown from a given number including the negative copies from the user in Prolog? How to print a countdown from a given number including the negative copies from the user in Prolog? list countdown prolog a the How Prolog X-1 How to print a countdown from a given number including the negative copies fr...
[ 0.00189208984375, -0.0111083984375, -0.00927734375, 0.0159912109375, -0.00579833984375, 0.0126953125, -0.00885009765625, 0.00020122528076171875, 0.009033203125, -0.0172119140625, -0.01092529296875, -0.03076171875, 0.006134033203125, 0.01239013671875, 0.008544921875, 0.00445556640625, ...
[ 11249, 28412, 54529, 34695, 1295, 34475, 14012, 40907, 71200, 38937, 1250, 4867, 10, 26719, 5303, 502, 1193, 5759, 23, 45367, 1653, 2063, 1542, 866, 13319, 3642, 2046, 4358 ]
[ 0.05328369140625, 0.1893310546875, 0.196533203125, 0.19677734375, 0.087890625, 0.0712890625, 0.1490478515625, 0.2119140625, 0.1624755859375, 0.149169921875, 0.150390625, 0.2034912109375, 0.032196044921875, 0.0273284912109375, 0.0982666015625, 0.0958251953125, 0.052490234375, 0.0775...
embed
60649327_c0
60649327
prolog
0
Title: Getting the last letter of two strings in prolog Problem title: Getting the last letter of two strings in prolog Tags: prolog, string Problem: Getting the last letter of two strings in prolog I am trying to get the last letter of two strings in prolog and output them in prolog. example: "body", "hello" OUTPUT sh...
Getting the last letter of two strings in prolog Getting the last letter of two strings in prolog prolog string Getting atom_concat Getting the last letter of two strings in prolog I am trying to get the last letter of two strings in prolog and output them in prolog. example: "body", "hello" OUTPUT should be X = yo. I ...
[ 0.0289306640625, 0.01458740234375, 0.006927490234375, 0.04150390625, -0.0186767578125, 0.0235595703125, 0.02392578125, 0.015869140625, 0.0024871826171875, -0.0224609375, 0.02294921875, -0.019287109375, -0.004119873046875, -0.004791259765625, -0.0106201171875, 0.01019287109375, -0.014...
[ 210732, 70, 4568, 31330, 111, 6626, 79315, 7, 23, 502, 4867, 34627, 2271, 4460, 31577, 2046, 140992, 27781, 37873, 127, 13817, 52001, 124599, 5608, 1193, 2203, 3005, 55300, 2060, 63049, 150624, 29806, 32166 ]
[ 0.0924072265625, 0.05340576171875, 0.2015380859375, 0.1893310546875, 0.08197021484375, 0.120849609375, 0.190673828125, 0.0052490234375, 0.037689208984375, 0.130615234375, 0.21142578125, 0.21044921875, 0.057586669921875, 0.17919921875, 0.019775390625, 0.0640869140625, 0.113037109375, ...
embed
59739743_c0
59739743
prolog
0
Title: Find all lists of sublists that when concatenated give a given list Problem title: Find all lists of sublists that when concatenated give a given list Tags: prolog Problem: Find all lists of sublists that when concatenated give a given list I wrote this function that given as a first parameter a list of lists, i...
Find all lists of sublists that when concatenated give a given list Find all lists of sublists that when concatenated give a given list prolog Find Find all lists of sublists that when concatenated give a given list I wrote this function that given as a first parameter a list of lists, it generates in the second parame...
[ 0.0064697265625, 0.0030364990234375, 0.0086669921875, 0.01080322265625, -0.00823974609375, 0.0126953125, 0.0016632080078125, 0.0037689208984375, 0.027099609375, -0.033447265625, 0.02587890625, -0.005126953125, 0.006622314453125, 0.034912109375, -0.00151824951171875, 0.0021820068359375,...
[ 26040, 756, 5303, 7, 111, 1614, 6562, 450, 3229, 158, 4460, 33, 27686, 8337, 34475, 502, 4867, 54397, 32354, 5117, 171859, 139392, 17932, 16750, 26518, 3444, 4488, 3789, 3917, 10932, 4027, 5584, 1542, 133063, 96386, 163, 1193, 2203, 155761,...
[ 0.1190185546875, 0.13525390625, 0.216552734375, 0.060272216796875, 0.039886474609375, 0.211181640625, 0.2509765625, 0.01483154296875, 0.0880126953125, 0.0989990234375, 0.1273193359375, 0.12255859375, 0.0975341796875, 0.120849609375, 0.060760498046875, 0.0634765625, 0.1063232421875, ...
embed
9648317_c1
9648317
prolog
1
_det(SNo, Year)), write(StudentName), write(' '), write(SNo). The last clause, print_students_lectured_by(Lect), is supposed to print out the names of the students followed by their student number. However, it only gives a false answer. I am extremely new at this so would appreciate any advice on how to amend my clause...
_det(SNo, Year)), write(StudentName), write(' '), write(SNo). The last clause, print_students_lectured_by(Lect), is supposed to print out the names of the students followed by their student number. However, it only gives a false answer. I am extremely new at this so would appreciate any advice on how to amend my clause...
[ 0.009765625, 0.0162353515625, 0.01153564453125, 0.0118408203125, -0.031982421875, -0.00775146484375, 0.00640869140625, -0.0169677734375, 0.0079345703125, 0.01446533203125, -0.0172119140625, -0.012451171875, 0.003997802734375, 0.0013275146484375, -0.004608154296875, -0.011962890625, -...
[ 101, 3667, 294, 5021, 42552, 33022, 239825, 163612, 247, 4568, 70731, 13, 28412, 96610, 7, 8996, 987, 297, 1272, 866, 24762, 134598, 1810, 123055, 25921, 134629, 9836, 14012, 33306, 4734, 98320, 35166, 111531, 3525, 67660, 10, 25965, 99455, ...
[ 0.004638671875, 0.223876953125, 0.035614013671875, 0.20703125, 0.17822265625, 0.07598876953125, 0.170166015625, 0.1318359375, 0.01287841796875, 0.1278076171875, 0.1451416015625, 0.0845947265625, 0.18017578125, 0.1978759765625, 0.0926513671875, 0.09613037109375, 0.0997314453125, 0.0...
embed
18598030_c0
18598030
prolog
0
Title: Swap second and prelast element from a list prolog Problem title: Swap second and prelast element from a list prolog Tags: prolog, element, swap Problem: Swap second and prelast element from a list prolog Well, for the last few hours, I've been trying to swap the second item of a given list with its penultimate ...
Swap second and prelast element from a list prolog Swap second and prelast element from a list prolog prolog element swap a Swap List1 List2 Swap second and prelast element from a list prolog Well, for the last few hours, I've been trying to swap the second item of a given list with its penultimate item (the second las...
[ 0.0022735595703125, 0.00665283203125, -0.003875732421875, 0.007659912109375, -0.0169677734375, 0.02587890625, -0.00836181640625, 0.0224609375, 0.006103515625, 0.0157470703125, 0.01397705078125, 0.01025390625, -0.00860595703125, 0.0115966796875, -0.00628662109375, 0.000659942626953125, ...
[ 43062, 254, 17932, 136, 479, 19777, 12830, 1295, 5303, 502, 4867, 202317, 32036, 418, 304, 21974, 31577, 35735, 678, 5551, 77968, 4568, 77878, 275, 238, 420, 3444, 2046, 71, 67, 191633, 1193, 70, 3525, 68062, 48398, 80854 ]
[ 0.2008056640625, 0.1173095703125, 0.210693359375, 0.089599609375, 0.1697998046875, 0.20654296875, 0.172607421875, 0.0660400390625, 0.1822509765625, 0.1383056640625, 0.1793212890625, 0.234619140625, 0.1722412109375, 0.06231689453125, 0.1151123046875, 0.054443359375, 0.068115234375, ...
embed
31164078_c0
31164078
prolog
0
Title: What&#x27;s the difference between &quot;false&quot; and &quot;no&quot; in Prolog Problem title: What&#x27;s the difference between &quot;false&quot; and &quot;no&quot; in Prolog Tags: prolog-toplevel, prolog Problem: What's the difference between "false" and "no" in Prolog I started to learn Prolog following th...
What&#x27;s the difference between &quot;false&quot; and &quot;no&quot; in Prolog What&#x27;s the difference between &quot;false&quot; and &quot;no&quot; in Prolog prolog-toplevel prolog What Prolog SWI-Prolog What's the difference between "false" and "no" in Prolog I started to learn Prolog following the book Programm...
[ 0.029052734375, 0.035888671875, 0.01171875, 0.0093994140625, -0.01953125, 0.0167236328125, 0.01141357421875, 0.004608154296875, -0.0096435546875, 0.005157470703125, 0.0001926422119140625, -0.0147705078125, -0.0177001953125, 0.021728515625, -0.002838134765625, -0.000598907470703125, 0...
[ 4865, 3768, 60212, 17721, 41502, 8710, 184, 136, 157, 23, 1250, 4867, 502, 67919, 159, 38969, 10752, 70, 30698, 27958, 17408, 20744, 64627, 46876, 35166, 110, 11814, 29459, 33720, 51, 27430, 678, 9655, 5526, 37629, 959, 5701, 98320, 15400, ...
[ 0.005706787109375, 0.04742431640625, 0.193115234375, 0.057373046875, 0.001739501953125, 0.1839599609375, 0.157470703125, 0.1092529296875, 0.216552734375, 0.05657958984375, 0.1512451171875, 0.227783203125, 0.080810546875, 0.037933349609375, 0.0279541015625, 0.1776123046875, 0.12023925...
embed
38739595_c0
38739595
prolog
0
Title: predicate encode in prolog Problem title: predicate encode in prolog Tags: encoding, prolog Problem: predicate encode in prolog I'm new in prolog and I'm trying to write the predicate encode(L,L1) which counts the duplicates of elements in L ,for example: encode([4,4,4,3,3],L). L=[3,4,2,3]. This is what I have w...
predicate encode in prolog predicate encode in prolog encoding prolog predicate encode in prolog I'm new in prolog and I'm trying to write the predicate encode(L,L1) which counts the duplicates of elements in L ,for example: This is what I have written: The above predicate is not reversible. It only works if the first ...
[ 0.003875732421875, 0.00628662109375, -0.004913330078125, 0.01153564453125, -0.0162353515625, -0.00092315673828125, -0.003631591796875, 0.0166015625, 0.0074462890625, -0.041748046875, -0.005096435546875, -0.001007080078125, 0.012451171875, 0.009521484375, 0.0167236328125, 0.014770507812...
[ 1653, 2063, 67, 22, 40899, 23, 502, 4867, 587, 3525, 31577, 33022, 866, 17727, 54529, 171763, 1636, 80854, 339, 59121, 36917, 959, 39531, 55356, 43240, 5117, 171859, 62952, 27781 ]
[ 0.1962890625, 0.21240234375, 0.0943603515625, 0.139404296875, 0.251220703125, 0.026611328125, 0.1597900390625, 0.2232666015625, 0.1856689453125, 0.0169677734375, 0.0229034423828125, 0.1341552734375, 0.04742431640625, 0.06439208984375, 0.1580810546875, 0.1990966796875, 0.0720825195312...
embed
13648474_c0
13648474
prolog
0
Title: path finding in prolog Problem title: path finding in prolog Tags: prolog, algorithm Problem: path finding in prolog I need to write a program in prolog for finding paths, for example, for the graph: edge(a, b). edge(a, c). edge(c, b). and the test case are: /* test case 1 */ ?- path(a, b, P). P = [a, b] ; P = [...
path finding in prolog path finding in prolog prolog algorithm path finding in prolog I need to write a program in prolog for finding paths, for example, for the graph: and the test case are: and my code is However, for the test case 2, my code will show I know that I should add a cut in my code to remove the false in ...
[ 0.0181884765625, 0.03125, 0.0203857421875, 0.009033203125, -0.00933837890625, 0.023681640625, -0.03271484375, 0.0084228515625, 0.0029144287109375, -0.060546875, 0.01123046875, -0.0030975341796875, -0.0206298828125, 0.003631591796875, 0.0157470703125, 0.01226806640625, -0.001770019531...
[ 60875, 90791, 23, 502, 4867, 234873, 3871, 33022, 1528, 7, 41382, 3034, 7225, 18151, 116, 3714, 5608, 15190, 10, 59226, 87388, 98320, 86869, 2967 ]
[ 0.251953125, 0.1773681640625, 0.057098388671875, 0.1578369140625, 0.2396240234375, 0.19091796875, 0.0226593017578125, 0.050140380859375, 0.10498046875, 0.07373046875, 0.140625, 0.1260986328125, 0.09619140625, 0.1265869140625, 0.0491943359375, 0.023406982421875, 0.02130126953125, 0....
embed
54751141_c1
54751141
prolog
1
PathsRec(X, YP, V, LP). % Down move(X, Y, V, L) :- YP is Y - 1, YP > 0, append(L, [d], LP), getAllPathsRec(X, YP, V, LP). The output: ?- getAllPaths(6). [r,r,r,r,r,u,l,l,l,l,l,u,r,r] true ; [r,r,r,r,r,u,l,l,l,l,l,u,r,u,l,u,r,r,r,r,r,d,l,l,l,d] true ; [r,r,r,r,r,u,l,l,l,l,l,u,r,u,l,u,r,r,r,r,r,d,l,l,d,l] true ; [...] ?-...
PathsRec(X, YP, V, LP). % Down move(X, Y, V, L) :- YP is Y - 1, YP > 0, append(L, [d], LP), getAllPathsRec(X, YP, V, LP). The output: ?- getAllPaths(6). [r,r,r,r,r,u,l,l,l,l,l,u,r,r] true ; [r,r,r,r,r,u,l,l,l,l,l,u,r,u,l,u,r,r,r,r,r,d,l,l,l,d] true ; [r,r,r,r,r,u,l,l,l,l,l,u,r,u,l,u,r,r,r,r,r,d,l,l,d,l] true ; [...] ?-...
[ 0.00176239013671875, 0.01007080078125, 0.0189208984375, 0.006256103515625, -0.00176239013671875, 0.01068115234375, -0.0089111328125, 0.00201416015625, 0.02001953125, -0.02587890625, 0.00390625, -0.006134033203125, -0.0050048828125, 0.032470703125, -0.0098876953125, -0.00860595703125, ...
[ 108421, 7, 4332, 238, 1542, 94588, 310, 82080, 1745, 49472, 25813, 990, 339, 83, 20, 106, 977, 757, 114689, 866, 71, 2046, 43512, 683, 10519, 140992, 705, 9, 169073, 42, 4, 34, 29568, 36076, 62163, 179933, 3688, 136993, 23972, 17569, 16...
[ 0.2381591796875, 0.0880126953125, 0.1712646484375, 0.1654052734375, 0.1177978515625, 0.2003173828125, 0.1715087890625, 0.1630859375, 0.038665771484375, 0.2147216796875, 0.18798828125, 0.135009765625, 0.0748291015625, 0.040740966796875, 0.0253448486328125, 0.08367919921875, 0.04257202...
embed
78125184_c0
78125184
prolog
0
Title: DELETE AN ELEMENT OF A LIST IN PROLOG Problem title: DELETE AN ELEMENT OF A LIST IN PROLOG Tags: prolog Problem: DELETE AN ELEMENT OF A LIST IN PROLOG I need to delete an element of a list in prolog, but it only work when you put the list in the consult for example: eliminar(1,[1,2,3], X) . it returns X=2,3 , bu...
DELETE AN ELEMENT OF A LIST IN PROLOG DELETE AN ELEMENT OF A LIST IN PROLOG prolog DELETE ELEMENT LIST PROLOG Predicado DELETE AN ELEMENT OF A LIST IN PROLOG I need to delete an element of a list in prolog, but it only work when you put the list in the consult for example: eliminar(1,[1,2,3], X) . it returns X=2,3 , bu...
[ 0.00115966796875, 0.015869140625, -0.00994873046875, 0.0235595703125, -0.01361083984375, 0.0118408203125, 0.003997802734375, 0.01513671875, 0.0027008056640625, -0.016845703125, 0.0106201171875, 0.00138092041015625, -0.01507568359375, -0.0035552978515625, 0.002410888671875, 0.009765625,...
[ 20866, 60136, 14368, 9780, 124661, 31766, 195977, 5881, 10514, 47510, 502, 4867, 7145, 14, 38344, 62, 6, 3871, 154109, 12830, 111, 5303, 23, 4734, 4488, 3884, 75463, 79046, 133063, 96386, 1193, 30646, 155761, 6165, 11, 3132, 98320, 1484, 31...
[ 0.1748046875, 0.1243896484375, 0.0419921875, 0.1221923828125, 0.12158203125, 0.121826171875, 0.21240234375, 0.0953369140625, 0.1776123046875, 0.220703125, 0.1695556640625, 0.2222900390625, 0.11767578125, 0.09368896484375, 0.1419677734375, 0.01068115234375, 0.000701904296875, 0.0467...
embed
19284573_c0
19284573
prolog
0
Title: Find a element in a sublist from a list at prolog Problem title: Find a element in a sublist from a list at prolog Tags: prolog Problem: Find a element in a sublist from a list at prolog I have this initialstate(0,[],[[1,0],[2,3],[1,2],[2,3]]). I would like to find which sublist inside the list is the same with ...
Find a element in a sublist from a list at prolog Find a element in a sublist from a list at prolog prolog a Find Newlist Find a element in a sublist from a list at prolog I have this I would like to find which sublist inside the list is the same with the number 1. And after delete the sublist who had the number one. I...
[ 0.00262451171875, -0.002471923828125, 0.00811767578125, 0.017578125, -0.023681640625, 0.009765625, 0.007080078125, 0.020263671875, 0.0279541015625, -0.0115966796875, 0.01171875, 0.017578125, -0.006317138671875, 0.013916015625, 0.0064697265625, 0.006805419921875, 0.039794921875, 0.0...
[ 26040, 12830, 23, 10, 1614, 6562, 1295, 5303, 99, 502, 4867, 2356, 765, 2806, 1884, 47, 7413, 46132, 83, 5701, 678, 14012, 615, 154109, 2750, 1902, 1632, 3714, 44691, 73342, 3444, 2704 ]
[ 0.1475830078125, 0.1937255859375, 0.0809326171875, 0.022003173828125, 0.2088623046875, 0.2440185546875, 0.121337890625, 0.16748046875, 0.09197998046875, 0.1290283203125, 0.2095947265625, 0.12646484375, 0.010223388671875, 0.0029296875, 0.04779052734375, 0.012969970703125, 0.1398925781...
embed
38254957_c1
38254957
prolog
1
_):-!. find_segment(_,[_],_):-!. find_segment(_,[_,_],_):-!. find_segment(P,[slope(R,Ps)|Ss],[L1|Lines]):- ( confronta_test(R,Ss) -> find_same(P,Ps,R,Ss,L1), find_segment(P,Ss,Lines) ;find_segment(P,Ss,Lines) ). Now Swi-Prolog return me: 252 ?- find_segment(pt(1,1),[slope(6,pt(2,2)),slope(6,pt(3,3)),slope(6,pt(4,4)),sl...
_):-!. find_segment(_,[_],_):-!. find_segment(_,[_,_],_):-!. find_segment(P,[slope(R,Ps)|Ss],[L1|Lines]):- ( confronta_test(R,Ss) -> find_same(P,Ps,R,Ss,L1), find_segment(P,Ss,Lines) ;find_segment(P,Ss,Lines) ). Now Swi-Prolog return me: 252 ?- find_segment(pt(1,1),[slope(6,pt(2,2)),slope(6,pt(3,3)),slope(6,pt(4,4)),sl...
[ 0.002197265625, 0.002166748046875, 0.0118408203125, -0.003692626953125, -0.0196533203125, -0.0093994140625, -0.00860595703125, 0.01434326171875, -0.0054931640625, -0.034423828125, 0.006256103515625, 0.0103759765625, -0.0078125, 0.00023746490478515625, 0.00994873046875, 0.01312255859375...
[ 101, 38, 7413, 25398, 674, 683, 89059, 1052, 7, 866, 418, 93232, 106457, 6954, 294, 33079, 40175, 17727, 111607, 14240, 105432, 9, 10752, 4867, 30646, 163, 714, 304, 705, 6328, 139303, 124093, 140447, 2389, 176129, 178692, 339, 2203, 27037,...
[ 0.0251312255859375, 0.054901123046875, 0.203369140625, 0.2469482421875, 0.2091064453125, 0.058502197265625, 0.157958984375, 0.0275421142578125, 0.012115478515625, 0.045806884765625, 0.037872314453125, 0.136474609375, 0.1971435546875, 0.1484375, 0.018768310546875, 0.00860595703125, 0....
embed
5993394_c0
5993394
prolog
0
Title: a challenging list question on prolog Problem title: a challenging list question on prolog Tags: list, prolog Problem: a challenging list question on prolog I am new on prolog. Can you help me to solve this problem, please. exam(math, paul). exam(phys, paul). exam(cmpe, sofia). exam(bio, george). I want to imple...
a challenging list question on prolog a challenging list question on prolog list prolog a challenging list question on prolog I am new on prolog. Can you help me to solve this problem, please. exam(math, paul). exam(phys, paul). exam(cmpe, sofia). exam(bio, george). I want to implement the predicate otherExam(L, N). L ...
[ 0.0177001953125, 0.0159912109375, 0.0115966796875, 0.00494384765625, -0.00823974609375, 0.0107421875, -0.007781982421875, 0.005645751953125, 0.0233154296875, -0.029296875, 0.0224609375, 0.00160980224609375, 0.0137939453125, -0.006561279296875, 0.006103515625, 0.01806640625, 0.0281982...
[ 10, 223920, 5303, 9655, 98, 502, 4867, 3525, 4171, 4358, 86869, 2967, 22936, 42276, 125458, 249, 202, 34053, 19738, 221, 32041, 8730, 20787, 27616, 3444, 29479, 1653, 2063, 67, 3789, 19279, 302, 132, 866, 4, 541, 339, 83, 199, 1681, 756...
[ 0.0855712890625, 0.256591796875, 0.2255859375, 0.1527099609375, 0.07177734375, 0.141357421875, 0.2244873046875, 0.045562744140625, 0.0165557861328125, 0.081787109375, 0.09588623046875, 0.09295654296875, 0.04510498046875, 0.1910400390625, 0.10400390625, 0.0699462890625, 0.1376953125, ...
embed
33135575_c0
33135575
prolog
0
Title: insert Element at specific position Problem title: insert Element at specific position Tags: prolog, list Problem: insert Element at specific position I started Prolog (just for my own) and i am struggling with recursion. I want a "method", that inserts an element at a specific position within a list. What i tri...
insert Element at specific position insert Element at specific position prolog list Element Position List ResultList Pos Pos1 Pos-1 ZL1 insert Element at specific position I started Prolog (just for my own) and i am struggling with recursion. I want a "method", that inserts an element at a specific position within a li...
[ -0.01348876953125, -0.013427734375, -0.003509521484375, -0.0164794921875, -0.0152587890625, 0.0189208984375, -0.024169921875, -0.01129150390625, 0.002105712890625, -0.023681640625, 0.02880859375, -0.025146484375, -0.015869140625, -0.01507568359375, 0.000614166259765625, 0.0019226074218...
[ 183540, 48325, 99, 29458, 19069, 502, 4867, 5303, 99428, 32036, 126684, 154663, 13498, 418, 5759, 567, 866, 26859, 1250, 20314, 100, 10002, 237875, 195625, 1830, 3444, 1928, 7352, 7, 12830, 28032, 37842, 2060, 7413, 17, 32233, 96704, 45767, ...
[ 0.24267578125, 0.2264404296875, 0.1334228515625, 0.239013671875, 0.2440185546875, 0.13134765625, 0.2275390625, 0.152099609375, 0.1337890625, 0.08056640625, 0.1314697265625, 0.0880126953125, 0.1214599609375, 0.0291900634765625, 0.03509521484375, 0.0190887451171875, 0.011016845703125, ...
embed
57020271_c0
57020271
prolog
0
Title: How to improve solution for string concatenation? Problem title: How to improve solution for string concatenation? Tags: prolog Problem: How to improve solution for string concatenation? SWI-Prolog has no list concatenation function, and I have to write it myself. I know the classic solution, but it does not all...
How to improve solution for string concatenation? How to improve solution for string concatenation? prolog How How to improve solution for string concatenation? SWI-Prolog has no list concatenation function, and I have to write it myself. I know the classic solution, but it does not allow access to the head and tail of...
[ 0.00799560546875, -0.007598876953125, 0.01385498046875, 0.02001953125, -0.0167236328125, 0.01416015625, -0.017333984375, 0.00775146484375, 0.01239013671875, -0.046875, 0.013916015625, -0.0198974609375, -0.005157470703125, -0.00982666015625, 0.004547119140625, 0.00396728515625, -0.012...
[ 11249, 52295, 29806, 100, 79315, 158, 4460, 33, 2320, 47, 502, 4867, 159, 38969, 10752, 1556, 110, 5303, 32354, 33022, 35978, 3714, 54704, 959, 63769, 17203, 10336, 136, 46741, 17932, 15190, 1528, 26458, 17582, 9969, 34759, 3173 ]
[ 0.07684326171875, 0.206787109375, 0.188232421875, 0.043212890625, 0.2352294921875, 0.10723876953125, 0.1680908203125, 0.145263671875, 0.051055908203125, 0.0197601318359375, 0.0968017578125, 0.212646484375, 0.0386962890625, 0.184814453125, 0.1307373046875, 0.00213623046875, 0.05575561...
embed
68216151_c0
68216151
prolog
0
Title: prolog f(X) :- X==[] Problem title: prolog f(X) :- X==[] Tags: prolog Problem: prolog f(X) :- X==[] when I have the prolog programm f(X) :- X==[]. the output is |:-f(X). false. :-f([]). true. in the first output prolog claims that there is no X , so that f(X) is true. But f([]) is true, so prolog should have sai...
prolog f(X) :- X==[] prolog f(X) :- X==[] prolog prolog f(X) :- X==[] when I have the prolog programm the output is in the first output prolog claims that there is no X , so that f(X) is true. But f([]) is true, so prolog should have said X=[] . as the answer to the first query. Why is this? How can I fix it. has an ev...
[ 0.0172119140625, -0.0081787109375, 0.00299072265625, 0.0078125, -0.00109100341796875, 0.008544921875, -0.0014190673828125, 0.0014190673828125, 0.00579833984375, -0.0089111328125, 0.041015625, 0.0000820159912109375, -0.00714111328125, -0.000713348388671875, 0.015380859375, -0.0158691406...
[ 502, 4867, 1238, 1542, 15772, 1193, 69112, 1065, 132, 28966, 140992, 5117, 140526, 2685, 83, 110, 29568, 4966, 5608, 765, 2804, 1369, 237, 35166, 41, 1294, 44084, 903, 30022, 124632, 2967, 18822, 10, 136, 876, 621, 24763, 5701, 63805, 591...
[ 0.203857421875, 0.246826171875, 0.1539306640625, 0.19677734375, 0.0721435546875, 0.1883544921875, 0.25439453125, 0.09478759765625, 0.0865478515625, 0.1256103515625, 0.1622314453125, 0.0872802734375, 0.1304931640625, 0.048004150390625, 0.054656982421875, 0.115478515625, 0.169799804687...
embed
29722126_c0
29722126
prolog
0
Title: How do I return a specific list in Prolog? Problem title: How do I return a specific list in Prolog? Tags: list, append, prolog Problem: How do I return a specific list in Prolog? I've written a small Prolog program that's supposed to check a list and see whether the head Ha is greater than K , if it is, it is s...
How do I return a specific list in Prolog? How do I return a specific list in Prolog? list append prolog How Prolog teilliste_grK How do I return a specific list in Prolog? I've written a small Prolog program that's supposed to check a list and see whether the head Ha is greater than K , if it is, it is supposed to app...
[ 0.01153564453125, 0.005279541015625, 0.00762939453125, -0.0091552734375, -0.007476806640625, -0.00010013580322265625, 0.0067138671875, 0.00830078125, 0.0162353515625, 0.0184326171875, 0.0234375, -0.0216064453125, -0.0299072265625, 0.00811767578125, 0.0146484375, -0.006591796875, 0.03...
[ 11249, 54, 30646, 29458, 5303, 23, 1250, 4867, 87, 114689, 71, 502, 48211, 12897, 3964, 605, 10, 59121, 19336, 1528, 134598, 12765, 1957, 10336, 1391, 83, 117396, 3501, 341, 442, 627, 175199, 8337, 4420, 58055, 167785, 892, 26255, 18151, ...
[ 0.1142578125, 0.038543701171875, 0.275146484375, 0.2474365234375, 0.245361328125, 0.089599609375, 0.1788330078125, 0.278076171875, 0.00762939453125, 0.10205078125, 0.017578125, 0.1312255859375, 0.085693359375, 0.1932373046875, 0.112548828125, 0.132568359375, 0.002899169921875, 0.05...
embed
58149695_c0
58149695
prolog
0
Title: Finding consecutive sublists of a list Problem title: Finding consecutive sublists of a list Tags: prolog Problem: Finding consecutive sublists of a list I want to write a predicate split/2 that generates all consecutive lists found inside another list. Example : split([1,2,3,4],X) should return X = [4] , X = [2...
Finding consecutive sublists of a list Finding consecutive sublists of a list prolog Finding Finding consecutive sublists of a list I want to write a predicate split/2 that generates all consecutive lists found inside another list. Example : split([1,2,3,4],X) should return X = [4] , X = [2,3] , X = [1,2] , X = [1,2,3]...
[ -0.00537109375, 0.004058837890625, -0.00194549560546875, -0.000133514404296875, -0.020751953125, 0.034423828125, -0.0024871826171875, 0.01312255859375, 0.0294189453125, -0.0194091796875, 0.0098876953125, 0.0198974609375, -0.01104736328125, 0.0159912109375, 0.0130615234375, 0.0274658203...
[ 26040, 148390, 13, 1614, 6562, 7, 5303, 111, 502, 4867, 3444, 33022, 1653, 2063, 67, 65450, 12477, 139392, 756, 14037, 46132, 15700, 89536, 132, 133063, 82449, 1542, 5608, 30646, 1193, 59535, 155761, 2060, 7722, 41, 27781, 96853, 51, 3206, ...
[ 0.1220703125, 0.2239990234375, 0.0926513671875, 0.224365234375, 0.259033203125, 0.093994140625, 0.2100830078125, 0.01556396484375, 0.1029052734375, 0.1417236328125, 0.063720703125, 0.059173583984375, 0.122802734375, 0.1307373046875, 0.0595703125, 0.1925048828125, 0.2132568359375, 0...
embed
67284309_c0
67284309
prolog
0
Title: a search word (W) in the dictionary in prolog Problem title: a search word (W) in the dictionary in prolog Tags: prolog Problem: a search word (W) in the dictionary in prolog I am trying to bring back the words that contains the letter 'W' in it in prolog. I need to write a program in prolog that brings all the ...
a search word (W) in the dictionary in prolog a search word (W) in the dictionary in prolog prolog a search word (W) in the dictionary in prolog I am trying to bring back the words that contains the letter 'W' in it in prolog. I need to write a program in prolog that brings all the words that contain 'w' in it. I have ...
[ 0.00634765625, -0.00732421875, -0.00250244140625, 0.005340576171875, -0.0087890625, 0.00811767578125, 0.0191650390625, -0.00193023681640625, 0.00433349609375, -0.04736328125, -0.00048828125, 0.0030517578125, -0.018798828125, 0.0032958984375, -0.00030517578125, 0.013916015625, 0.02050...
[ 33938, 2565, 1456, 23, 45, 10763, 6635, 502, 4867, 10, 31577, 47, 19095, 4420, 34153, 70541, 31330, 442, 3871, 33022, 1528, 756, 434, 37842, 26818, 51, 2886, 26366, 1810, 5303, 24232, 662, 12936, 68634, 5689, 16294, 4927, 1777, 186, 11, ...
[ 0.21875, 0.1806640625, 0.24267578125, 0.06640625, 0.041107177734375, 0.11865234375, 0.06610107421875, 0.14892578125, 0.2176513671875, 0.0263671875, 0.04345703125, 0.0020751953125, 0.1104736328125, 0.1229248046875, 0.1856689453125, 0.10223388671875, 0.116943359375, 0.01043701171875,...
embed
74778479_c0
74778479
prolog
0
Title: How to assert multiple facts or rules in one assert/1 statement? Problem title: How to assert multiple facts or rules in one assert/1 statement? Tags: prolog, prolog-toplevel Problem: How to assert multiple facts or rules in one assert/1 statement? If I'm at the repl I can do ?- assert(foo(a)),assert(foo(b)),ass...
How to assert multiple facts or rules in one assert/1 statement? How to assert multiple facts or rules in one assert/1 statement? prolog prolog-toplevel How How to assert multiple facts or rules in one assert/1 statement? If I'm at the repl I can do and that works, but not or similar. Is there a way to only need to typ...
[ 0.0252685546875, 0.00012302398681640625, -0.00836181640625, 0.0308837890625, -0.0201416015625, -0.005767822265625, -0.01092529296875, -0.0026092529296875, 0.007171630859375, -0.01385498046875, -0.005157470703125, 0.001129150390625, -0.0089111328125, 0.00927734375, 0.00125885009765625, ...
[ 11249, 47, 237, 33657, 48716, 15824, 7, 707, 91736, 23, 1632, 11583, 63805, 502, 4867, 13784, 67919, 99, 456, 2424, 831, 43240, 21373, 3917, 4734, 3871, 10644, 162, 24145, 27875, 143834, 163846, 54, 51584, 3642 ]
[ 0.080078125, 0.058258056640625, 0.1114501953125, 0.2427978515625, 0.255615234375, 0.1844482421875, 0.08941650390625, 0.059844970703125, 0.2005615234375, 0.09893798828125, 0.1397705078125, 0.187744140625, 0.200439453125, 0.0853271484375, 0.1590576171875, 0.059112548828125, 0.141967773...
embed
2380421_c0
2380421
prolog
0
Title: Prolog: Error Handling and Find Unique Problem title: Prolog: Error Handling and Find Unique Tags: error-handling, prolog Problem: Prolog: Error Handling and Find Unique Given: fruitid('Apple', 'Granny Smith', 1). fruitid('Apple', 'Cox', 2). fruitid('Pear', 'Bartlett', 3). How would I go about finding only uniqu...
Prolog: Error Handling and Find Unique Prolog: Error Handling and Find Unique error-handling prolog Prolog Error Handling Find Unique Apple Granny Smith Cox Pear Bartlett is_unique FruitName Prolog: Error Handling and Find Unique Given: How would I go about finding only unique items for instance: In the example clauses...
[ 0.00787353515625, 0.0086669921875, 0.01409912109375, -0.0186767578125, 0.0003490447998046875, 0.0159912109375, 0.0040283203125, -0.008544921875, 0.00055694580078125, 0.002716064453125, -0.006988525390625, -0.0186767578125, 0.025146484375, -0.005340576171875, 0.0181884765625, 0.01123046...
[ 1250, 4867, 212059, 193237, 136, 26040, 11789, 944, 18499, 54885, 502, 4129, 14091, 299, 37700, 1311, 425, 1460, 147, 41272, 37356, 83, 34, 45602, 151958, 163612, 12, 77878, 11249, 2806, 738, 1672, 90791, 4734, 36998, 55769, 110527, 27781, ...
[ 0.15966796875, 0.2445068359375, 0.1619873046875, 0.224609375, 0.04339599609375, 0.1436767578125, 0.238525390625, 0.168701171875, 0.1966552734375, 0.203369140625, 0.115234375, 0.20947265625, 0.0987548828125, 0.130615234375, 0.17578125, 0.0802001953125, 0.1168212890625, 0.18542480468...
embed
27092102_c0
27092102
prolog
0
Title: Product of range in Prolog Problem title: Product of range in Prolog Tags: prolog, math, failure-slice Problem: Product of range in Prolog I need to write a program, which calculates product of product in range: I written the following code: mult(N,N,R,R). mult(N,Nt,R,Rt):-N1=Nt+1,R1=Rt*(1/(log(Nt))),mult(N,N1,R...
Product of range in Prolog Product of range in Prolog prolog math failure-slice Product Prolog ERROR Out Product of range in Prolog I need to write a program, which calculates product of product in range: I written the following code: This should implement basic product from Nt to N of 1/ln(j) . As far as I understand ...
[ -0.0140380859375, 0.031494140625, 0.00494384765625, 0.00142669677734375, 0.0012359619140625, 0.01287841796875, -0.006011962890625, 0.01104736328125, 0.01129150390625, -0.025634765625, 0.018310546875, 0.038818359375, -0.01025390625, -0.027587890625, 0.0255126953125, -0.00787353515625, ...
[ 73111, 111, 37457, 1250, 4867, 23, 502, 48909, 137578, 13348, 151206, 24638, 13538, 3871, 33022, 1528, 74481, 12996, 59121, 25632, 18151, 5608, 29479, 62822, 1295, 541, 18, 47, 106, 64, 19, 170, 28219, 4163, 118066, 3229, 136, 105950, 831, ...
[ 0.270263671875, 0.1551513671875, 0.24267578125, 0.1602783203125, 0.25390625, 0.049468994140625, 0.109130859375, 0.143310546875, 0.2027587890625, 0.1583251953125, 0.1385498046875, 0.0472412109375, 0.1258544921875, 0.033355712890625, 0.0704345703125, 0.11767578125, 0.147705078125, 0....
embed
37277341_c0
37277341
prolog
0
Title: Check if all tuples in a list are different (ECLiPSe) Problem title: Check if all tuples in a list are different (ECLiPSe) Tags: prolog, list, tuples Problem: Check if all tuples in a list are different (ECLiPSe) I have a list with tuples like this: [(1,2),(5,3),(6,7)] I'm trying to write a predicate that checks...
Check if all tuples in a list are different (ECLiPSe) Check if all tuples in a list are different (ECLiPSe) prolog list tuples Check ECLiPSe all_diff Check if all tuples in a list are different (ECLiPSe) I have a list with tuples like this: I'm trying to write a predicate that checks if all tuples in a list are differe...
[ -0.0098876953125, 0.0028839111328125, 0.0113525390625, 0.022705078125, -0.01373291015625, -0.0177001953125, -0.007049560546875, 0.00506591796875, 0.02294921875, -0.0020904541015625, 0.0067138671875, 0.01202392578125, 0.023681640625, 0.0306396484375, -0.0067138671875, 0.01123046875, 0...
[ 38679, 2174, 756, 370, 99726, 23, 5303, 12921, 16546, 9506, 9059, 13, 621, 502, 4867, 59947, 152462, 1653, 2063, 12765, 13315, 43240, 892, 26255, 32786, 12477, 8705, 36849, 18113, 44402, 10644, 18499 ]
[ 0.1514892578125, 0.084716796875, 0.1251220703125, 0.1461181640625, 0.2403564453125, 0.0567626953125, 0.18798828125, 0.207763671875, 0.034454345703125, 0.094970703125, 0.08123779296875, 0.0882568359375, 0.045013427734375, 0.0728759765625, 0.114501953125, 0.0364990234375, 0.17724609375...
embed
74335407_c0
74335407
prolog
0
Title: prolog List Reverse Problem title: prolog List Reverse Tags: swi-prolog, prolog Problem: prolog List Reverse %reverse_List reverseList(H|T,ReversedList):- reverseListHelper(T,[H],ReversedList). reverseListHelper([],Accumulator.Accumulator). reverseListHelper([H|T],Accumulator,ReversedList):- reverseListHelper(T,...
prolog List Reverse prolog List Reverse swi-prolog prolog List Reverse reverse_List ReversedList Accumulator.Accumulator Accumulator prolog List Reverse I am beginner to prolog, what wrong with this code ? it's just giving the output false kindly explain thanks I understand the theory of how recursive works in list rev...
[ 0.007293701171875, 0.0322265625, 0.0106201171875, 0.01055908203125, -0.01519775390625, 0.01104736328125, 0.0023193359375, 0.025634765625, -0.00139617919921875, -0.0029296875, 0.0155029296875, 0.007598876953125, 0.00885009765625, 0.0037078857421875, 0.0269775390625, 0.0228271484375, 0...
[ 502, 4867, 32036, 853, 37676, 2452, 3454, 39531, 184, 154663, 7864, 29899, 316, 129073, 10591, 9842, 1679, 2367, 44691, 903, 18151, 1660, 68772, 140992, 98320, 73342, 28219, 154453, 195625, 5844, 43240, 5303, 6953, 13315 ]
[ 0.1353759765625, 0.238037109375, 0.2183837890625, 0.09710693359375, 0.275634765625, 0.134033203125, 0.1090087890625, 0.217529296875, 0.1156005859375, 0.1705322265625, 0.183349609375, 0.0418701171875, 0.13037109375, 0.1773681640625, 0.1339111328125, 0.00262451171875, 0.054351806640625...
embed
30153135_c2
30153135
prolog
2
X7, 0, X9], [X1, X2, X3, X4, X5, X6, X7, X9, 0]). %%down b([X1, X2, X3, 0, X5, X6, X7, X8, X9], [0, X2, X3, X1, X5, X6, X7, X8, X9]). b([X1, X2, X3, X4, 0, X6, X7, X8, X9], [X1, 0, X3, X4, X2, X6, X7, X8, X9]). b([X1, X2, X3, X4, X5, 0, X7, X8, X9], [X1, X2, 0, X4, X5, X3, X7, X8, X9]). b([X1, X2, X3, X4, X5, X6, 0, X...
X7, 0, X9], [X1, X2, X3, X4, X5, X6, X7, X9, 0]). %%down b([X1, X2, X3, 0, X5, X6, X7, X8, X9], [0, X2, X3, X1, X5, X6, X7, X8, X9]). b([X1, X2, X3, X4, 0, X6, X7, X8, X9], [X1, 0, X3, X4, X2, X6, X7, X8, X9]). b([X1, X2, X3, X4, X5, 0, X7, X8, X9], [X1, X2, 0, X4, X5, X3, X7, X8, X9]). b([X1, X2, X3, X4, X5, X6, 0, X...
[ -0.016357421875, 0.0157470703125, 0.021728515625, 0.0108642578125, -0.01531982421875, 0.006256103515625, -0.038330078125, -0.0023193359375, 0.0166015625, 0.033935546875, 0.0087890625, 0.009033203125, 0.01007080078125, -0.001312255859375, -0.025390625, -0.00335693359375, 0.00497436523...
[ 1193, 966, 4, 757, 1126, 268, 378, 1542, 418, 304, 363, 617, 758, 910, 194, 1745, 3949, 34695, 876, 132, 1065, 1019, 2389, 2480, 28 ]
[ 0.24609375, 0.26904296875, 0.1141357421875, 0.1998291015625, 0.302001953125, 0.068603515625, 0.0540771484375, 0.2379150390625, 0.1776123046875, 0.22216796875, 0.226318359375, 0.231201171875, 0.2239990234375, 0.217041015625, 0.109130859375, 0.0758056640625, 0.1470947265625, 0.252197...
embed
60202916_c0
60202916
prolog
0
Title: How to question user in forward chainig expert system Problem title: How to question user in forward chainig expert system Tags: prolog, expert-system Problem: How to question user in forward chainig expert system I have to create an expert system in the medical field, I decided to use forward chaining starting ...
How to question user in forward chainig expert system How to question user in forward chainig expert system prolog expert-system How How to question user in forward chainig expert system I have to create an expert system in the medical field, I decided to use forward chaining starting from a set of facts, and then I ha...
[ 0.03857421875, 0.004547119140625, -0.01263427734375, 0.028076171875, -0.00482177734375, 0.02294921875, 0.0023651123046875, 0.0189208984375, -0.00167083740234375, -0.06494140625, 0.01025390625, 0.01458740234375, -0.00148773193359375, 0.01177978515625, -0.013916015625, 0.0025787353515625...
[ 11249, 47, 9655, 38937, 23, 40225, 1608, 40348, 26808, 5426, 502, 4867, 16751, 28282, 29874, 44457, 4527, 14653, 72134, 1295, 15824, 8, 106357, 4677, 2704, 47099, 3642, 54, 101934, 67, 5117, 4034, 53498, 80973, 9433, 7968, 51359, 3647, 1713...
[ 0.097900390625, 0.06109619140625, 0.26318359375, 0.244384765625, 0.03155517578125, 0.1719970703125, 0.161376953125, 0.1800537109375, 0.1795654296875, 0.15478515625, 0.104248046875, 0.1556396484375, 0.1483154296875, 0.059967041015625, 0.118408203125, 0.0628662109375, 0.03582763671875,...
embed
22947208_c0
22947208
prolog
0
Title: Splitting a list of numbers into a list of lists of pairs Problem title: Splitting a list of numbers into a list of lists of pairs Tags: list, prolog Problem: Splitting a list of numbers into a list of lists of pairs Say I have a list [1, 2, 3, 4, 5, 6, 7, 8] , what I want to do is have an output of [[1,2], [3,4...
Splitting a list of numbers into a list of lists of pairs Splitting a list of numbers into a list of lists of pairs list prolog Splitting Splitting a list of numbers into a list of lists of pairs Say I have a list [1, 2, 3, 4, 5, 6, 7, 8] , what I want to do is have an output of [[1,2], [3,4], [5,6], [7,8]] . This is m...
[ -0.022705078125, 0.01904296875, 0.00023651123046875, -0.0107421875, -0.01556396484375, 0.040771484375, -0.02197265625, 0.000682830810546875, 0.01214599609375, -0.0196533203125, 0.0024871826171875, 0.0019683837890625, -0.006927490234375, 0.005523681640625, -0.009033203125, 0.00854492187...
[ 46474, 1916, 5303, 111, 101935, 3934, 7, 80836, 10, 502, 4867, 25916, 765, 68252, 116, 138, 4, 201, 190, 305, 361, 382, 6, 3444, 54, 142, 140992, 110558, 133063, 268, 82449, 104629, 136005, 43581, 81887, 66596, 541, 140909, 1221, 30957, ...
[ 0.2398681640625, 0.097412109375, 0.2418212890625, 0.11083984375, 0.21337890625, 0.179443359375, 0.06915283203125, 0.26513671875, 0.049957275390625, 0.141845703125, 0.1856689453125, 0.032196044921875, 0.07293701171875, 0.033477783203125, 0.098876953125, 0.1424560546875, 0.032043457031...
embed
59349498_c0
59349498
prolog
0
Title: Running sum list for prolog? Problem title: Running sum list for prolog? Tags: prolog Problem: Running sum list for prolog? Hello I am trying to do something like this where I am able call to call: running_list([1, 4, -5, 5, -2], R) and the results should be: R = [1, 5, 0, 5, 3] I run into a loop which I can't s...
Running sum list for prolog? Running sum list for prolog? prolog Running running_list First Second Total Tail Current Running sum list for prolog? Hello I am trying to do something like this where I am able call to call: running_list([1, 4, -5, 5, -2], R) and the results should be: R = [1, 5, 0, 5, 3] I run into a loop...
[ 0.0128173828125, 0.011474609375, 0.02880859375, 0.002777099609375, -0.0242919921875, 0.01080322265625, -0.015869140625, 0.0091552734375, -0.0008544921875, -0.04833984375, 0.0167236328125, 0.00372314453125, -0.00274658203125, 0.0096435546875, 0.017578125, 0.02392578125, 0.026489257812...
[ 28398, 592, 10554, 5303, 100, 502, 4867, 51042, 6562, 23972, 77648, 33867, 1218, 379, 114063, 35378, 31577, 19048, 11782, 201, 20, 758, 190, 90173, 627, 50339, 5608, 2203, 757, 138, 11675, 3934, 40956, 48903, 26366, 77947, 4358, 20697, 2980...
[ 0.1517333984375, 0.090576171875, 0.2171630859375, 0.222900390625, 0.08209228515625, 0.1466064453125, 0.23876953125, 0.1998291015625, 0.21923828125, 0.0396728515625, 0.10028076171875, 0.1156005859375, 0.1116943359375, 0.11669921875, 0.173828125, 0.01348876953125, 0.059844970703125, ...
embed
17218145_c0
17218145
prolog
0
Title: Permutations of power set in Prolog Problem title: Permutations of power set in Prolog Tags: prolog Problem: Permutations of power set in Prolog I am supposed to write a program in Prolog which when given a list,returns the permutation of its powerset. one thing I forgot to mention: I already have a predicate th...
Permutations of power set in Prolog Permutations of power set in Prolog prolog Permutations Prolog sublist_perm Permutations of power set in Prolog I am supposed to write a program in Prolog which when given a list,returns the permutation of its powerset. one thing I forgot to mention: I already have a predicate that r...
[ 0.007781982421875, 0.0035858154296875, 0.01153564453125, 0.0037841796875, -0.0093994140625, 0.0025177001953125, -0.019287109375, 0.00250244140625, 0.0263671875, -0.0267333984375, -0.00958251953125, 0.03466796875, 0.0284423828125, 0.03369140625, -0.006317138671875, 0.015869140625, 0.0...
[ 908, 14311, 21094, 14537, 5423, 1250, 4867, 23, 502, 1614, 6562, 1264, 39, 134598, 33022, 1528, 34475, 5303, 65395, 117, 561, 22062, 3509, 9904, 41392, 21771, 1653, 2063, 39531, 5908, 53894, 107, 37676, 154663, 4332, 334, 705, 22144, 1542, ...
[ 0.1063232421875, 0.223876953125, 0.07171630859375, 0.1695556640625, 0.17822265625, 0.1612548828125, 0.2255859375, 0.01544189453125, 0.1102294921875, 0.1605224609375, 0.17724609375, 0.140625, 0.08001708984375, 0.0321044921875, 0.045196533203125, 0.09967041015625, 0.0477294921875, 0....
embed
70362688_c0
70362688
prolog
0
Title: SWI-Prolog, Read the file and sum the numbers in the file Problem title: SWI-Prolog, Read the file and sum the numbers in the file Tags: file, prolog Problem: SWI-Prolog, Read the file and sum the numbers in the file I am learning prolog and have the following problem: Reads an input file, line by line. Then wri...
SWI-Prolog, Read the file and sum the numbers in the file SWI-Prolog, Read the file and sum the numbers in the file file prolog SWI-Prolog Read input.txt output.txt SWI-Prolog, Read the file and sum the numbers in the file I am learning prolog and have the following problem: Reads an input file, line by line. Then writ...
[ 0.0076904296875, -0.0021820068359375, 0.0072021484375, 0.00946044921875, -0.0225830078125, 0.01019287109375, 0.0166015625, 0.0179443359375, 0.0002918243408203125, -0.0269775390625, -0.00156402587890625, -0.005645751953125, -0.031005859375, -0.00007772445678710938, 0.026611328125, -0.00...
[ 159, 38969, 9, 10752, 4867, 4764, 11435, 136, 10554, 101935, 23, 502, 107730, 124326, 140992, 52080, 25632, 2967, 13315, 390, 33022, 111, 12638, 47, 77878, 3173, 116, 361, 201, 190, 138, 757, 483, 98423, 42805, 892, 26255, 84797, 32628, 1...
[ 0.07965087890625, 0.272216796875, 0.03009033203125, 0.1751708984375, 0.20703125, 0.187255859375, 0.16748046875, 0.034332275390625, 0.2132568359375, 0.1680908203125, 0.0325927734375, 0.15966796875, 0.180419921875, 0.2313232421875, 0.19921875, 0.078857421875, 0.013702392578125, 0.087...
embed
10456502_c0
10456502
prolog
0
Title: Prolog construction of a list using =../2 Problem title: Prolog construction of a list using =../2 Tags: prolog, list Problem: Prolog construction of a list using =../2 I want to construct from a list like this: [name1(value1), name2(value2),...] a list like this: [value1, value2,...] , and I have the following ...
Prolog construction of a list using =../2 Prolog construction of a list using =../2 prolog list Prolog name1 value1 name2 value2 construct_listv Values Value ResultList Prolog construction of a list using =../2 I want to construct from a list like this: [name1(value1), name2(value2),...] a list like this: [value1, valu...
[ 0.01483154296875, -0.007293701171875, 0.01397705078125, -0.0019989013671875, 0.010498046875, -0.027099609375, -0.010986328125, 0.0230712890625, 0.012451171875, -0.02001953125, 0.0201416015625, -0.016357421875, 0.007537841796875, 0.0162353515625, 0.0024871826171875, -0.010498046875, 0...
[ 1250, 4867, 50961, 5303, 17368, 2203, 5, 12477, 502, 9351, 34292, 304, 64549, 6562, 334, 190060, 126684, 154663, 3444, 1295, 1884, 903, 11627, 27494, 10461, 18151, 1159, 40970, 40, 124534, 15400, 17932, 11782, 114689, 71, 35782, 26785 ]
[ 0.145751953125, 0.2244873046875, 0.171142578125, 0.2164306640625, 0.052581787109375, 0.1051025390625, 0.0302734375, 0.2176513671875, 0.118896484375, 0.001708984375, 0.1263427734375, 0.074951171875, 0.18798828125, 0.1009521484375, 0.186279296875, 0.14794921875, 0.1328125, 0.17724609...
embed
38421881_c0
38421881
prolog
0
Title: Prolog-operator &quot;_:_&quot; - meaning? Problem title: Prolog-operator &quot;_:_&quot; - meaning? Tags: prolog, operator-keyword Problem: Prolog-operator "_:_" - meaning? I do not understand the following Prolog snippet? What does ":_:" mean? What is the difference between ":=" and "=" ? game_to_problematic_p...
Prolog-operator &quot;_:_&quot; - meaning? Prolog-operator &quot;_:_&quot; - meaning? prolog operator-keyword Prolog-operator _:_ game_to_problematic_points Game Pid Hid Point point:_:Hits Hit1 Hits hit_out Hit Prolog-operator "_:_" - meaning? I do not understand the following Prolog snippet? What does ":_:" mean? What...
[ 0.023681640625, 0.008056640625, 0.0228271484375, -0.00537109375, -0.01007080078125, -0.010498046875, -0.006134033203125, 0.00927734375, -0.00494384765625, -0.0062255859375, 0.028564453125, -0.011962890625, 0.0201416015625, -0.00677490234375, -0.00689697265625, -0.01275634765625, 0.00...
[ 1250, 4867, 9, 206469, 41502, 454, 12, 1230, 91084, 20, 502, 39933, 19770, 47416, 6712, 188, 38953, 11, 9523, 38496, 13547, 436, 532, 72483, 41097, 6275, 841, 14481, 43482, 418, 145484, 5962, 6056, 959, 28219, 25632, 93, 58134, 14602, 294...
[ 0.1729736328125, 0.2445068359375, 0.01177978515625, 0.25634765625, 0.08837890625, 0.1885986328125, 0.1800537109375, 0.032989501953125, 0.1767578125, 0.0274810791015625, 0.1275634765625, 0.2177734375, 0.04949951171875, 0.091552734375, 0.088134765625, 0.1500244140625, 0.132080078125, ...
embed
15723453_c0
15723453
prolog
0
Title: recursion in prolog - error in base case Problem title: recursion in prolog - error in base case Tags: prolog Problem: recursion in prolog - error in base case I'm trying to write predicate range\3 that takes three parameters the first is the start, the second is the end and return the generated list in the thir...
recursion in prolog - error in base case recursion in prolog - error in base case prolog recursion in prolog - error in base case I'm trying to write predicate range\3 that takes three parameters the first is the start, the second is the end and return the generated list in the third argument. E.g rang(1,5,L). I used t...
[ -0.007415771484375, 0.0213623046875, 0.0130615234375, -0.0089111328125, 0.004913330078125, 0.0152587890625, -0.039306640625, 0.0140380859375, 0.00136566162109375, -0.025634765625, 0.015380859375, 0.02099609375, 0.001007080078125, -0.0004291534423828125, 0.033935546875, -0.0009689331054...
[ 195625, 1830, 23, 502, 4867, 18499, 3647, 7225, 31577, 33022, 1653, 2063, 67, 37457, 41872, 363, 51776, 17262, 171859, 83, 4034, 17932, 3564, 30646, 139392, 5303, 50960, 10750, 17163, 57626, 866, 11814, 18151, 14602, 959, 4488, 144851, 75101,...
[ 0.267578125, 0.1097412109375, 0.0511474609375, 0.1619873046875, 0.2467041015625, 0.20068359375, 0.20947265625, 0.206298828125, 0.0587158203125, 0.0810546875, 0.1090087890625, 0.163818359375, 0.046630859375, 0.21044921875, 0.031005859375, 0.1417236328125, 0.02264404296875, 0.1142578...
embed
57393356_c1
57393356
prolog
1
Interconnect_2, Interconnect_1), cell(North_2, Interconnect_1, Interconnect_3, East_1), cell(Interconnect_2, West_2, South_1, Interconnect_4), cell(Interconnect_3, Interconnect_4, South_2, East_2). So my question is, how can I generalize this process for a NxN grid? I'm sure there can be good ways to handle the argume...
Interconnect_2, Interconnect_1), cell(North_2, Interconnect_1, Interconnect_3, East_1), cell(Interconnect_2, West_2, South_1, Interconnect_4), cell(Interconnect_3, Interconnect_4, South_2, East_2). So my question is, how can I generalize this process for a NxN grid? I'm sure there can be good ways to handle the argume...
[ 0, 0.0013427734375, -0.011962890625, 0.00921630859375, -0.0155029296875, 0.0169677734375, 0.0025482177734375, -0.000499725341796875, -0.009033203125, -0.0167236328125, 0.00701904296875, 0.00836181640625, -0.017578125, 0.007232666015625, -0.03369140625, 0.003387451171875, 0.0094604492...
[ 5337, 135457, 304, 115187, 38750, 50645, 363, 24453, 44851, 10542, 25134, 29557, 617, 10461, 3642, 4537, 20650, 903, 9433, 541, 425, 839, 120067, 34831, 10750, 2967, 1653, 2063, 12638, 32036, 237875, 12663, 8562, 5062, 45646, 28864, 26073, 7,...
[ 0.1448974609375, 0.2486572265625, 0.1251220703125, 0.1199951171875, 0.1727294921875, 0.102294921875, 0.06341552734375, 0.1220703125, 0.1334228515625, 0.1251220703125, 0.154052734375, 0.0938720703125, 0.117919921875, 0.037017822265625, 0.006622314453125, 0.1395263671875, 0.05911254882...
embed
8488723_c0
8488723
prolog
0
Title: Prolog recursion which appends elements to the list Problem title: Prolog recursion which appends elements to the list Tags: list, prolog, recursion Problem: Prolog recursion which appends elements to the list I try to build predicate which will append random number of sublists result list. my_predicate([], Anot...
Prolog recursion which appends elements to the list Prolog recursion which appends elements to the list list prolog recursion Prolog my_predicate AnotherList Head List Result nested_predicate SM2 Prolog recursion which appends elements to the list I try to build predicate which will append random number of sublists res...
[ -0.0208740234375, 0.01068115234375, 0.0211181640625, -0.00885009765625, 0.0001983642578125, 0.032470703125, 0.01226806640625, 0.0037384033203125, 0.0252685546875, -0.05126953125, 0.02734375, -0.003173828125, -0.0247802734375, 0.0172119140625, 0.0235595703125, -0.004547119140625, 0.02...
[ 1250, 4867, 195625, 1830, 3129, 114689, 6468, 80854, 47, 5303, 502, 759, 19714, 2063, 116267, 154663, 44816, 32036, 126684, 8512, 71, 22972, 304, 9790, 45367, 1653, 67, 96759, 14012, 1614, 6562, 16750, 110518, 3664, 53418, 95486, 44691 ]
[ 0.1649169921875, 0.220458984375, 0.1998291015625, 0.1082763671875, 0.005859375, 0.1417236328125, 0.058624267578125, 0.1456298828125, 0.09576416015625, 0.1588134765625, 0.119384765625, 0.1146240234375, 0.1405029296875, 0.19091796875, 0.09027099609375, 0.1240234375, 0.108154296875, 0...
embed
68614837_c0
68614837
prolog
0
Title: How to fix this recursive multiplication? Problem title: How to fix this recursive multiplication? Tags: termination, recursion, prolog, multiplication, failure-slice Problem: How to fix this recursive multiplication? I am new to logic programming and Prolog. The following Prolog program defines a predicate mul/...
How to fix this recursive multiplication? How to fix this recursive multiplication? termination recursion prolog multiplication failure-slice How Stack Choice _1326 _1354 _1382 _1410 _1438 How to fix this recursive multiplication? I am new to logic programming and Prolog. The following Prolog program defines a predicat...
[ -0.0064697265625, 0.0205078125, 0.01361083984375, 0.01202392578125, -0.00518798828125, 0.00139617919921875, -0.00616455078125, 0.01104736328125, 0.00095367431640625, -0.0181884765625, 0.01263427734375, -0.0018157958984375, -0.01531982421875, -0.00927734375, 0.037353515625, -0.014831542...
[ 11249, 47, 30022, 903, 195625, 5844, 127664, 1363, 29527, 1830, 502, 4867, 137578, 13348, 6512, 2594, 181948, 2681, 4046, 12338, 12012, 2592, 963, 10991, 3525, 62775, 56037, 1250, 25632, 1528, 61924, 1653, 2063, 67, 16690, 18113, 6024, 62479,...
[ 0.09832763671875, 0.045135498046875, 0.1820068359375, 0.1077880859375, 0.2303466796875, 0.1610107421875, 0.1953125, 0.0694580078125, 0.1600341796875, 0.031463623046875, 0.114501953125, 0.2310791015625, 0.2032470703125, 0.150634765625, 0.1064453125, 0.1463623046875, 0.2247314453125, ...
embed
10861093_c0
10861093
prolog
0
Title: map function result to another Problem title: map function result to another Tags: prolog Problem: map function result to another After I have seen these question , I have tried to solve below problem. But I could not solve it. Can anyone help me ? predefined : foo( X, Y ) bar( Y, Z ) ^ ^ ^ ^ all of them is atom...
map function result to another map function result to another prolog map function result to another After I have seen these question , I have tried to solve below problem. But I could not solve it. Can anyone help me ? For these case how can I run bar with all possibilities of Y, resulted after eash run of foo ?
[ 0.020751953125, -0.01104736328125, 0.00159454345703125, 0.0269775390625, -0.01123046875, 0.007232666015625, -0.005035400390625, 0.01507568359375, 0.019287109375, -0.0174560546875, 0.0103759765625, 0.0017852783203125, -0.00970458984375, 0.0159912109375, 0.010009765625, -0.0245361328125,...
[ 22288, 32354, 16750, 47, 15700, 502, 4867, 51592, 37842, 86869, 35064, 2967, 5809, 959, 4358, 3642, 831, 11675, 1909, 678, 756, 97370, 2449, 990, 297, 7103, 28, 19346, 111, 5775, 31 ]
[ 0.21044921875, 0.2012939453125, 0.2105712890625, 0.137451171875, 0.11920166015625, 0.125, 0.19091796875, 0.050872802734375, 0.0248870849609375, 0.11138916015625, 0.1488037109375, 0.10980224609375, 0.020111083984375, 0.0219573974609375, 0.05450439453125, 0.0689697265625, 0.06573486328...
embed
53573885_c0
53573885
prolog
0
Title: Why do these two prolog sentences have different outputs? Problem title: Why do these two prolog sentences have different outputs? Tags: prolog Problem: Why do these two prolog sentences have different outputs? I've recently started learning Prolog and there's something that I don't understand. Why do these two ...
Why do these two prolog sentences have different outputs? Why do these two prolog sentences have different outputs? prolog Why Why do these two prolog sentences have different outputs? I've recently started learning Prolog and there's something that I don't understand. Why do these two sentences gives different outputs...
[ 0.0206298828125, 0.006683349609375, 0.00836181640625, -0.00323486328125, -0.007476806640625, 0.0030517578125, -0.0019989013671875, 0.0150146484375, 0.01361083984375, 0.0166015625, 0.022705078125, 0.0022125244140625, 0.00653076171875, 0.01025390625, -0.00518798828125, -0.006561279296875...
[ 44084, 6097, 6626, 502, 4867, 149357, 765, 12921, 140992, 7, 52080, 1250, 2301, 18, 28219, 76199, 26818, 99, 25737, 111, 378, 58745, 10114, 125195, 8110, 186, 10336, 5303, 7108, 5609, 272, 46741, 3564, 2046, 15400, 17932, 51, 40383, 15044, ...
[ 0.140380859375, 0.0616455078125, 0.1484375, 0.1817626953125, 0.2203369140625, 0.1968994140625, 0.02838134765625, 0.20068359375, 0.2196044921875, 0.05206298828125, 0.0399169921875, 0.1427001953125, 0.0228729248046875, 0.03741455078125, 0.1148681640625, 0.056060791015625, 0.10070800781...
embed
35207993_c0
35207993
prolog
0
Title: How do i find the smallest value in prolog Problem title: How do i find the smallest value in prolog Tags: shortest-path, prolog Problem: How do i find the smallest value in prolog I have the following code option(2):- write('Enter place of origin: '), read(Origin), write('Enter place of destination: '), read(De...
How do i find the smallest value in prolog How do i find the smallest value in prolog shortest-path prolog How Enter Origin Destination Path Length TOTAL DISTANCE How do i find the smallest value in prolog I have the following code And I wanted to find the smallest value among the lengths. I get an output similar to th...
[ 0.01385498046875, 0.01055908203125, 0.013671875, 0.0042724609375, 0.0017547607421875, 0.01031494140625, 0.00933837890625, -0.0235595703125, 0.007293701171875, -0.04052734375, 0.005279541015625, 0.0174560546875, -0.0233154296875, -0.01251220703125, -0.000934600830078125, 0.0228271484375...
[ 11249, 17, 7413, 70, 19336, 525, 34292, 23, 502, 4867, 16610, 128405, 60816, 119862, 145778, 108421, 77554, 30487, 391, 35602, 18151, 54940, 140909, 140992 ]
[ 0.04217529296875, 0.070068359375, 0.1162109375, 0.08782958984375, 0.185546875, 0.198974609375, 0.1920166015625, 0.053863525390625, 0.1539306640625, 0.2291259765625, 0.1739501953125, 0.142822265625, 0.128173828125, 0.1910400390625, 0.1507568359375, 0.134521484375, 0.062164306640625, ...
embed
66305740_c0
66305740
prolog
0
Title: Prolog go through all lists of a list Problem title: Prolog go through all lists of a list Tags: prolog Problem: Prolog go through all lists of a list I would like to make the following piece of code work without using maplist. only_two([Person|Choice]) :- subset([red, red], Choice), not(subset([red, red, red], ...
Prolog go through all lists of a list Prolog go through all lists of a list prolog Prolog only_two Person Choice Others John Alice Fred Prolog go through all lists of a list I would like to make the following piece of code work without using maplist. Then I have What do I do wrong?
[ -0.00250244140625, 0.01434326171875, 0.00836181640625, 0.01446533203125, 0.00225830078125, 0.0224609375, -0.003631591796875, 0.005401611328125, 0.0128173828125, -0.01904296875, 0.01495361328125, 0.00634765625, 0.004913330078125, 0.02197265625, -0.01068115234375, 0.0036468505859375, 0...
[ 1250, 4867, 738, 8305, 756, 5303, 7, 111, 502, 4734, 55547, 15270, 181948, 4939, 66083, 47192, 1884, 3249, 25632, 63847, 18151, 4488, 15490, 17368, 22288, 6562, 54, 44691 ]
[ 0.2220458984375, 0.32470703125, 0.10284423828125, 0.2486572265625, 0.1805419921875, 0.2381591796875, 0.058624267578125, 0.07281494140625, 0.162353515625, 0.08856201171875, 0.1678466796875, 0.2020263671875, 0.1986083984375, 0.0970458984375, 0.0888671875, 0.1033935546875, 0.04260253906...
embed
30170292_c0
30170292
prolog
0
Title: list of ordered pairs in prolog Problem title: list of ordered pairs in prolog Tags: list, prolog Problem: list of ordered pairs in prolog I am trying to implement a prolog method that will take a number and return a list of all possible ordered pairs where both X and Y are less than the number given. For exampl...
list of ordered pairs in prolog list of ordered pairs in prolog list prolog N-1 list of ordered pairs in prolog I am trying to implement a prolog method that will take a number and return a list of all possible ordered pairs where both X and Y are less than the number given. For example Should return I am having troubl...
[ 0.01458740234375, 0.00994873046875, -0.00147247314453125, 0.00274658203125, 0.00084686279296875, 0.013427734375, 0.00061798095703125, -0.014404296875, 0.0021514892578125, -0.0189208984375, 0.0118408203125, 0.0064697265625, -0.01470947265625, -0.02978515625, 0.0023956298828125, -0.00150...
[ 5303, 12989, 297, 80836, 7, 23, 502, 4867, 541, 5759, 29479, 55300, 5646, 14012, 30646, 756, 7722, 15044, 1193, 136, 990, 40715, 3501, 34475, 27781, 151117, 63134, 100094, 18151, 25632, 140992, 71924, 4527, 100, 5584, 9226, 143907, 28219 ]
[ 0.1470947265625, 0.2095947265625, 0.09844970703125, 0.2406005859375, 0.017486572265625, 0.05267333984375, 0.1671142578125, 0.252685546875, 0.0799560546875, 0.157470703125, 0.1463623046875, 0.07513427734375, 0.068115234375, 0.130859375, 0.2464599609375, 0.031585693359375, 0.1599121093...
embed