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
53549372_c0
53549372
prolog
0
Title: Semi-colon when defining a rule Problem title: Semi-colon when defining a rule Tags: prolog Problem: Semi-colon when defining a rule I'm new to Prolog and I'm reading a simple line of Prolog code: sibling(X, Y) :- brother(X, Y); sister(X, Y). I know if it was: sibling(X, Y) :- brother(X, Y), sister(X, Y). then t...
Semi-colon when defining a rule Semi-colon when defining a rule prolog Semi-colon Semi-colon when defining a rule I'm new to Prolog and I'm reading a simple line of Prolog code: I know if it was: then that would mean the brother(X, Y) AND sister(X, Y) must be true for sibling(X, Y) to be true. This makes me believe tha...
[ 0.017822265625, 0.0147705078125, 0.0198974609375, 0.0216064453125, -0.01953125, 0.0189208984375, -0.00311279296875, 0.02001953125, -0.0103759765625, -0.0025482177734375, 0.01385498046875, -0.0262451171875, 0.0255126953125, -0.0054931640625, 0.00653076171875, -0.0155029296875, 0.01208...
[ 84420, 9, 22796, 19, 3229, 13204, 79986, 449, 10, 502, 4867, 1250, 16454, 8781, 18151, 3714, 2174, 509, 29459, 82953, 1542, 990, 48762, 114015, 8110, 29568, 78, 79298, 18822, 74, 33636, 707, 39933, 151575, 47, 4, 33172, 83 ]
[ 0.20654296875, 0.04205322265625, 0.1951904296875, 0.1143798828125, 0.024749755859375, 0.1790771484375, 0.2144775390625, 0.0267486572265625, 0.036712646484375, 0.1448974609375, 0.18359375, 0.1226806640625, 0.025634765625, 0.0059814453125, 0.10626220703125, 0.03497314453125, 0.02752685...
embed
9764612_c0
9764612
prolog
0
Title: Passing the Results of a Prolog Predicate Problem title: Passing the Results of a Prolog Predicate Tags: prolog Problem: Passing the Results of a Prolog Predicate How does one evaluate the result of a prolog predicate to pass as an argument? I am trying to write code to reverse pairs of elements in a list: swap(...
Passing the Results of a Prolog Predicate Passing the Results of a Prolog Predicate prolog Passing Results Prolog Predicate Passing the Results of a Prolog Predicate How does one evaluate the result of a prolog predicate to pass as an argument? I am trying to write code to reverse pairs of elements in a list: I want th...
[ 0.01239013671875, 0.0262451171875, 0.0118408203125, -0.0025634765625, -0.012939453125, 0.003082275390625, 0.006317138671875, 0.0009613037109375, 0.0054931640625, -0.0177001953125, 0.014892578125, 0.013427734375, -0.0208740234375, 0.004638671875, 0.006866455078125, 0.005584716796875, ...
[ 28872, 214, 146104, 111, 1250, 4867, 7145, 2063, 67, 502, 11249, 1632, 151575, 13, 16750, 1653, 47, 27875, 237, 142, 10750, 31577, 33022, 18151, 39531, 184, 80836, 80854, 5303, 3444, 2046, 11853 ]
[ 0.175048828125, 0.0711669921875, 0.2308349609375, 0.0185546875, 0.1998291015625, 0.24462890625, 0.1827392578125, 0.2105712890625, 0.0870361328125, 0.1817626953125, 0.0224609375, 0.005523681640625, 0.17236328125, 0.083251953125, 0.1761474609375, 0.192138671875, 0.048675537109375, 0....
embed
23704633_c0
23704633
prolog
0
Title: Cryptarithmetic multiplication returning false Problem title: Cryptarithmetic multiplication returning false Tags: prolog, cryptarithmetic-puzzle Problem: Cryptarithmetic multiplication returning false I would think my prolog code would work for this multiplication problem but it's returning false. Am I missing ...
Cryptarithmetic multiplication returning false Cryptarithmetic multiplication returning false prolog cryptarithmetic-puzzle Cryptarithmetic Digits assign_digits Cryptarithmetic multiplication returning false I would think my prolog code would work for this multiplication problem but it's returning false. Am I missing s...
[ -0.016357421875, 0.015380859375, -0.0024871826171875, 0.0240478515625, -0.038818359375, -0.000453948974609375, -0.02685546875, 0.00142669677734375, -0.0004253387451171875, 0.0006866455078125, 0.0135498046875, 0.0205078125, 0.005157470703125, 0.0211181640625, -0.0224609375, -0.005126953...
[ 239159, 8962, 127664, 1363, 30646, 98320, 147, 282, 9523, 214, 502, 4867, 136791, 1766, 13894, 51174, 933, 95486, 4803, 2806, 5351, 18151, 4488, 903, 2967, 1284, 132283 ]
[ 0.1480712890625, 0.094482421875, 0.185546875, 0.040283203125, 0.1583251953125, 0.20654296875, 0.032135009765625, 0.028533935546875, 0.038909912109375, 0.0709228515625, 0.11181640625, 0.1864013671875, 0.11181640625, 0.0197601318359375, 0.031463623046875, 0.06585693359375, 0.0022277832...
embed
42890281_c0
42890281
prolog
0
Title: Prolog - Count the Number of Repetitions in a List Problem title: Prolog - Count the Number of Repetitions in a List Tags: list, prolog Problem: Prolog - Count the Number of Repetitions in a List I'm writing a program in Prolog that counts the number of uninterrupted occurrences of the first value in a list. So ...
Prolog - Count the Number of Repetitions in a List Prolog - Count the Number of Repetitions in a List list prolog Prolog Count Number Repetitions List Prolog - Count the Number of Repetitions in a List I'm writing a program in Prolog that counts the number of uninterrupted occurrences of the first value in a list. So g...
[ 0.00616455078125, -0.0018310546875, 0.01611328125, 0.0216064453125, 0.00299072265625, 0.004119873046875, -0.0004711151123046875, 0.003021240234375, 0.0137939453125, -0.0294189453125, -0.02734375, -0.003570556640625, -0.004302978515625, 0.0264892578125, 0.01397705078125, 0.0047912597656...
[ 1250, 4867, 108210, 103332, 111, 853, 63065, 5256, 23, 32036, 70, 10, 5303, 502, 32562, 1528, 54529, 14012, 51, 10433, 9167, 74918, 42, 69098, 5117, 34292, 34475, 57346, 839, 238, 11, 2806, 30646, 541, 2203, 190, 18151, 33342, 1884, 2060 ...
[ 0.1712646484375, 0.2315673828125, 0.1998291015625, 0.148193359375, 0.049896240234375, 0.1529541015625, 0.30029296875, 0.16650390625, 0.058868408203125, 0.2076416015625, 0.00762939453125, 0.0195159912109375, 0.1943359375, 0.1251220703125, 0.09014892578125, 0.1568603515625, 0.1640625, ...
embed
50564074_c0
50564074
prolog
0
Title: How to suspend in ECLiPSe CLP until full list is instantiated? Problem title: How to suspend in ECLiPSe CLP until full list is instantiated? Tags: constraint-programming, eclipse-clp, prolog Problem: How to suspend in ECLiPSe CLP until full list is instantiated? ECLiPSe CLP has a built-in predicate suspend(+Goal...
How to suspend in ECLiPSe CLP until full list is instantiated? How to suspend in ECLiPSe CLP until full list is instantiated? constraint-programming eclipse-clp prolog How ECLiPSe CLP How to suspend in ECLiPSe CLP until full list is instantiated? ECLiPSe CLP has a built-in predicate suspend(+Goal, +Prio, +CondList) whe...
[ -0.00518798828125, -0.006439208984375, 0.01165771484375, 0.01312255859375, -0.015380859375, 0.0185546875, 0.0004024505615234375, -0.01080322265625, -0.009765625, -0.02978515625, 0.0166015625, -0.015869140625, -0.004852294921875, 0.0159912109375, 0.005096435546875, 0.003631591796875, ...
[ 11249, 47, 45890, 23, 59947, 9506, 9059, 13, 313, 37352, 24189, 4393, 5303, 34648, 14, 27686, 158, 2816, 4288, 28966, 106371, 184, 26775, 502, 4867, 88303, 1653, 2063, 1328, 17903, 997, 33163, 11935, 71, 154663, 1657, 27983, 3173, 1193, 3...
[ 0.0804443359375, 0.0205535888671875, 0.2841796875, 0.0885009765625, 0.1162109375, 0.1741943359375, 0.1497802734375, 0.1593017578125, 0.07061767578125, 0.228271484375, 0.13623046875, 0.1776123046875, 0.217041015625, 0.1502685546875, 0.1455078125, 0.1199951171875, 0.0015869140625, 0....
embed
55702332_c0
55702332
prolog
0
Title: Constraint over the integer division Problem title: Constraint over the integer division Tags: prolog, eclipse-clp Problem: Constraint over the integer division I have the following statement in prolog (Eclipse CLP): ?-X::1..100, X/5 #= 2, X = 12. The result is No. . I want to check that the integer division of ...
Constraint over the integer division Constraint over the integer division prolog eclipse-clp Constraint X::1..100 Constraint over the integer division I have the following statement in prolog (Eclipse CLP): The result is No. . I want to check that the integer division of X over 5 is equal to 2 or not. If I write the fo...
[ -0.0198974609375, -0.0076904296875, 0.0162353515625, 0.006134033203125, 0.0078125, 0.0005340576171875, -0.003326416015625, -0.0026092529296875, 0.0166015625, -0.033203125, 0.013427734375, 0.0152587890625, 0.01361083984375, 0.022705078125, -0.0022430419921875, -0.00174713134765625, 0....
[ 1657, 2816, 4288, 645, 70, 892, 1505, 91853, 502, 4867, 106371, 184, 26775, 1193, 5, 3559, 63805, 37352, 16750, 438, 3444, 12765, 190, 105950, 116, 959, 25632, 18499, 3642, 831, 77336 ]
[ 0.0745849609375, 0.2041015625, 0.1099853515625, 0.143310546875, 0.005523681640625, 0.1324462890625, 0.1356201171875, 0.2418212890625, 0.118896484375, 0.1993408203125, 0.1534423828125, 0.105712890625, 0.1192626953125, 0.145263671875, 0.00732421875, 0.1845703125, 0.1220703125, 0.1734...
embed
2426678_c0
2426678
prolog
0
Title: "dynamic" predicate in prolog Problem title: "dynamic" predicate in prolog Tags: prolog, prolog-directive-dynamic Problem: "dynamic" predicate in prolog If I want to make a rule dynamic so i can use assert after the database file has been loaded, how do i do it? I'm using XSB Prolog at the mo...
"dynamic" predicate in prolog "dynamic" predicate in prolog prolog prolog-directive-dynamic file.P continuation...blahblah "dynamic" predicate in prolog If I want to make a rule dynamic so i can use assert after the database file has been loaded, how do i do it? I'm using XSB Prolog at the moment, t...
[ 0.03662109375, 0.0084228515625, 0.023681640625, 0.0205078125, -0.01434326171875, 0.036865234375, 0.0020904541015625, 0.02978515625, -0.0023040771484375, -0.052734375, -0.00909423828125, 0.0181884765625, -0.0225830078125, -0.0263671875, 0.037353515625, 0.0302734375, 0.00335693359375, ...
[ 242554, 1230, 41502, 1653, 2063, 67, 502, 4867, 936, 100034, 11435, 683, 9454, 1363, 1566, 3444, 3249, 79986, 84079, 4527, 237, 33657, 7103, 63399, 1556, 2809, 72367, 54, 1193, 36474, 1250, 1884, 9790, 75463, 18499, 25647 ]
[ 0.245361328125, 0.01800537109375, 0.01593017578125, 0.1593017578125, 0.20556640625, 0.061492919921875, 0.13232421875, 0.2188720703125, 0.0770263671875, 0.1129150390625, 0.1334228515625, 0.06121826171875, 0.1083984375, 0.011749267578125, 0.141357421875, 0.047027587890625, 0.0557250976...
embed
1822039_c0
1822039
prolog
0
Title: Using And clause in HEAD of a prolog statement Problem title: Using And clause in HEAD of a prolog statement Tags: prolog Problem: Using And clause in HEAD of a prolog statement Every member of this club is either educated or rich or both. I wanted to write a statement very similar to above in my PROLOG code. I ...
Using And clause in HEAD of a prolog statement Using And clause in HEAD of a prolog statement prolog Using HEAD Using And clause in HEAD of a prolog statement Every member of this club is either educated or rich or both. I wanted to write a statement very similar to above in my PROLOG code. I wrote everything else. Thi...
[ 0.005035400390625, -0.00066375732421875, -0.001556396484375, 0.01226806640625, -0.0145263671875, 0.00927734375, -0.015380859375, 0.0174560546875, 0.01055908203125, -0.035888671875, 0.007598876953125, 0.00518798828125, 0.00104522705078125, 0.0198974609375, 0.00994873046875, -0.003555297...
[ 345, 3493, 70731, 13, 23, 572, 188328, 502, 4867, 63805, 32786, 111, 903, 11938, 40101, 155629, 98870, 15044, 36663, 33022, 21373, 36917, 10514, 47510, 18151, 54397, 26818, 59121, 18, 63769, 2499, 39933, 10336, 21974, 31577, 2886, 29806, 4324...
[ 0.047943115234375, 0.24658203125, 0.2269287109375, 0.06500244140625, 0.01898193359375, 0.1053466796875, 0.2255859375, 0.1429443359375, 0.184814453125, 0.171142578125, 0.1304931640625, 0.020721435546875, 0.0987548828125, 0.1888427734375, 0.000640869140625, 0.13037109375, 0.13989257812...
embed
36725837_c0
36725837
prolog
0
Title: Simple Tokenizer using SWI Prolog Problem title: Simple Tokenizer using SWI Prolog Tags: tokenize, prolog, lexer Problem: Simple Tokenizer using SWI Prolog I am trying to implement simple tokenizer. For instance phrase(lexer(L), "read N; SUM := 0; "), write(L). Would return: [key(read),id(N),sep(;),id(SUM),sep(:...
Simple Tokenizer using SWI Prolog Simple Tokenizer using SWI Prolog tokenize prolog lexer SWI Simple Tokenizer Prolog SUM Token Tail Simple Tokenizer using SWI Prolog I am trying to implement simple tokenizer. For instance Would return: This is what i have. I would be grateful for any advice how to develop it to make a...
[ 0.0179443359375, -0.00112152099609375, -0.01531982421875, 0.00946044921875, -0.0081787109375, -0.0147705078125, 0.01068115234375, 0.011962890625, -0.00494384765625, -0.03662109375, 0.0257568359375, 0.01495361328125, -0.0181884765625, -0.01483154296875, 0.0184326171875, 0.01507568359375...
[ 60552, 717, 1098, 52825, 17368, 159, 38969, 1250, 4867, 47, 20650, 502, 95, 34058, 127944, 1218, 379, 31577, 29479, 8781, 110527, 30646, 12, 3293, 83, 2367, 17, 765, 225876, 67660, 85493, 3249, 20697 ]
[ 0.216552734375, 0.12744140625, 0.1669921875, 0.197265625, 0.06463623046875, 0.04949951171875, 0.2110595703125, 0.1209716796875, 0.191650390625, 0.11083984375, 0.117431640625, 0.07427978515625, 0.07171630859375, 0.1644287109375, 0.1512451171875, 0.0628662109375, 0.081298828125, 0.06...
embed
65866311_c0
65866311
prolog
0
Title: Quick-Dict or Hash-List : value by key and key by value? Problem title: Quick-Dict or Hash-List : value by key and key by value? Tags: dictionary, lambda, list, maplist, prolog Problem: Quick-Dict or Hash-List : value by key and key by value? Invented quick and dirty Hash-like using a list i.e. [ key1:val1,key2:...
Quick-Dict or Hash-List : value by key and key by value? Quick-Dict or Hash-List : value by key and key by value? dictionary lambda list maplist prolog Quick-Dict Hash-List key1:val1 key2:val2 hl_keys Res K:_ hl_vals _:V Quick-Dict or Hash-List : value by key and key by value? Invented quick and dirty Hash-like using a...
[ 0.004852294921875, -0.0147705078125, 0.00019931793212890625, -0.03466796875, -0.0255126953125, -0.0225830078125, 0.01226806640625, -0.005401611328125, 0.0081787109375, 0.00142669677734375, 0.00104522705078125, -0.00299072265625, 0.0020751953125, 0.006622314453125, 0.0006103515625, 0.00...
[ 89038, 9, 14055, 15390, 707, 162087, 154663, 152, 34292, 390, 22799, 136, 45, 10763, 6492, 85, 5303, 22288, 6562, 502, 4867, 82825, 1405, 418, 304, 75084, 19770, 9624, 341, 856, 16274, 63773, 5402, 939, 5062, 17368, 831, 2046, 142424, 364...
[ 0.189453125, 0.07586669921875, 0.1785888671875, 0.1982421875, 0.048919677734375, 0.2298583984375, 0.275634765625, 0.005706787109375, 0.2288818359375, 0.135498046875, 0.2080078125, 0.1280517578125, 0.0179290771484375, 0.09063720703125, 0.147216796875, 0.087158203125, 0.1944580078125, ...
embed
66594020_c0
66594020
prolog
0
Title: How to get the result in the list with alternating sign using prolog? Problem title: How to get the result in the list with alternating sign using prolog? Tags: prolog, list Problem: How to get the result in the list with alternating sign using prolog? The program is to generate an alternating result of the list...
How to get the result in the list with alternating sign using prolog? How to get the result in the list with alternating sign using prolog? prolog list prolog How Call _11626 _12084 _12128 Exit _12222 _12266 _12360 _12404 _12498 _12542 _12586 _12630 _12674 How to get the result in the list with alternating sign using p...
[ 0.0096435546875, 0.023681640625, 0.004791259765625, -0.019287109375, 0.000255584716796875, 0.005950927734375, 0.005462646484375, 0.02294921875, 0.01422119140625, -0.0016326904296875, -0.0027618408203125, 0.01165771484375, -0.017333984375, 0.01544189453125, 0.005615234375, 0.01141357421...
[ 11249, 2046, 16750, 23, 5303, 678, 75939, 214, 24092, 17368, 502, 4867, 26265, 120620, 4046, 20840, 13903, 1530, 81764, 5443, 217, 132537, 108837, 14604, 38230, 109589, 165611, 167829, 189010, 77344, 1197, 16360, 1528, 139392, 104629, 418, 2806...
[ 0.031646728515625, 0.09417724609375, 0.19482421875, 0.030670166015625, 0.19921875, 0.0699462890625, 0.178955078125, 0.07763671875, 0.1827392578125, 0.043670654296875, 0.178466796875, 0.2440185546875, 0.1363525390625, 0.0716552734375, 0.1356201171875, 0.049072265625, 0.1087646484375, ...
embed
15923563_c0
15923563
prolog
0
Title: Prolog How to append new variable to list using predicate like append([Item], List)? Problem title: Prolog How to append new variable to list using predicate like append([Item], List)? Tags: prolog Problem: Prolog How to append new variable to list using predicate like append([Item], List)? I have a question abo...
Prolog How to append new variable to list using predicate like append([Item], List)? Prolog How to append new variable to list using predicate like append([Item], List)? prolog predicate Prolog How Item List Prolog How to append new variable to list using predicate like append([Item], List)? I have a question about app...
[ -0.004669189453125, 0.0108642578125, 0.00433349609375, 0.0074462890625, 0.002044677734375, 0.02880859375, -0.007781982421875, 0.0302734375, 0.0189208984375, -0.022705078125, 0.033935546875, -0.022216796875, -0.003387451171875, 0.00921630859375, 0.0087890625, 0.0004024505615234375, 0....
[ 1250, 4867, 11249, 114689, 71, 3525, 77336, 47, 5303, 17368, 1653, 2063, 67, 568, 2982, 32036, 502, 78426, 1884, 80854, 34475, 16940, 138, 4734, 6626, 69307, 144573 ]
[ 0.1495361328125, 0.1982421875, 0.042236328125, 0.1988525390625, 0.13623046875, 0.1510009765625, 0.27294921875, 0.0985107421875, 0.2227783203125, 0.059326171875, 0.1680908203125, 0.1890869140625, 0.07012939453125, 0.02093505859375, 0.1571044921875, 0.189208984375, 0.10498046875, 0.1...
embed
50173430_c0
50173430
prolog
0
Title: Replicate list by another list's number of items Problem title: Replicate list by another list's number of items Tags: prolog Problem: Replicate list by another list's number of items I'm trying to make this: times([x, x], [1, 5, 9, 8], Result). The second list is replicated by the number of elements i...
Replicate list by another list's number of items Replicate list by another list's number of items prolog Replicate Result List1 List2 Replicate list by another list's number of items I'm trying to make this: The second list is replicated by the number of elements in the first one. The result is : [1, 5, 9, 8,...
[ 0.005157470703125, 0.02099609375, 0.01348876953125, 0.0218505859375, -0.00787353515625, 0.0103759765625, -0.0164794921875, 0.01904296875, 0.007354736328125, -0.03173828125, 0.00012683868408203125, -0.0220947265625, -0.00162506103515625, 0.04052734375, -0.0157470703125, -0.0198974609375...
[ 853, 52721, 67, 5303, 390, 15700, 3768, 14012, 55769, 502, 4867, 126684, 32036, 304, 31577, 3249, 903, 17932, 143126, 3674, 80854, 5117, 16750, 83, 68252, 190, 483, 382, 106, 37842, 20697, 155965, 129745 ]
[ 0.1153564453125, 0.2286376953125, 0.1204833984375, 0.216796875, 0.113525390625, 0.109375, 0.0699462890625, 0.14453125, 0.1802978515625, 0.13720703125, 0.1844482421875, 0.1470947265625, 0.14404296875, 0.1131591796875, 0.05010986328125, 0.02783203125, 0.0322265625, 0.153564453125, ...
embed
50360222_c0
50360222
prolog
0
Title: Prolog member not found Problem title: Prolog member not found Tags: prolog, member Problem: Prolog member not found I have defined a code in PROLOG : is_member(X, [X|_]). is_member(X, [_|T]) :- is_member(X, T). I am confused by these two outputs : out1: is_member('a', ['b', 'c', 'd', 'a']). >> True. out2: Chars...
Prolog member not found Prolog member not found prolog member Prolog is_member Chars _2356 Prolog member not found I have defined a code in PROLOG : I am confused by these two outputs : out1: out2: Can someone help me out here? I though that output should be True. . I am trying to understand the logic here, but obvious...
[ 0.004974365234375, -0.0024261474609375, 0.0306396484375, 0.007049560546875, -0.024658203125, 0.0205078125, 0.00897216796875, 0.00445556640625, 0.0003681182861328125, -0.01171875, 0.03515625, -0.0015869140625, 0.01043701171875, 0.0103759765625, 0.006317138671875, -0.0216064453125, -0....
[ 1250, 4867, 32786, 959, 14037, 502, 83, 39, 27417, 21656, 129971, 61924, 18151, 10514, 47510, 55681, 6626, 140992, 1810, 82825, 304, 4358, 3688, 21208, 87599, 28219, 62775, 171259, 72856, 67660, 129745 ]
[ 0.17431640625, 0.232177734375, 0.2607421875, 0.0657958984375, 0.138671875, 0.11865234375, 0.00738525390625, 0.09716796875, 0.2049560546875, 0.14404296875, 0.19287109375, 0.1480712890625, 0.20166015625, 0.171875, 0.251708984375, 0.09521484375, 0.068359375, 0.1915283203125, 0.22973...
embed
71770123_c0
71770123
prolog
0
Title: Prolog: Is there a way to find the longest consecutive number sequence in a list and get its length? Problem title: Prolog: Is there a way to find the longest consecutive number sequence in a list and get its length? Tags: prolog Problem: Prolog: Is there a way to find the longest consecutive number sequence in ...
Prolog: Is there a way to find the longest consecutive number sequence in a list and get its length? Prolog: Is there a way to find the longest consecutive number sequence in a list and get its length? prolog Prolog Prolog: Is there a way to find the longest consecutive number sequence in a list and get its length? Giv...
[ 0.015869140625, 0.0242919921875, -0.0048828125, 0.025390625, 0.009521484375, 0.01177978515625, 0.0027618408203125, 0.021484375, 0.0164794921875, -0.0263671875, -0.006072998046875, 0.00848388671875, -0.00156402587890625, 0.0177001953125, 0.00787353515625, -0.0001316070556640625, -0.00...
[ 1250, 4867, 3917, 7413, 4989, 525, 148390, 13, 14012, 40, 944, 3956, 5303, 2046, 6863, 140909, 2685, 502, 2071, 190, 96759, 6083, 101935, 37457, 106, 47, 702, 163090, 1662, 1530, 2681, 3642, 1810, 8110, 150679, 105950, 138 ]
[ 0.1053466796875, 0.1917724609375, 0.09527587890625, 0.1123046875, 0.1658935546875, 0.1650390625, 0.22021484375, 0.06732177734375, 0.201171875, 0.0936279296875, 0.1639404296875, 0.08721923828125, 0.19580078125, 0.07373046875, 0.031768798828125, 0.1943359375, 0.017578125, 0.043975830...
embed
25938341_c0
25938341
prolog
0
Title: How to change an order of list of lists Problem title: How to change an order of list of lists Tags: prolog Problem: How to change an order of list of lists I have a list of substitutions between variables and values they are presented in a list [[x,y],[1,2]] (meaning that the value of x equals 1 , and the value...
How to change an order of list of lists How to change an order of list of lists prolog How How to change an order of list of lists I have a list of substitutions between variables and values they are presented in a list [[x,y],[1,2]] (meaning that the value of x equals 1 , and the value of y equals 2 ). I want to chang...
[ -0.00299072265625, 0.02587890625, 0.0098876953125, -0.00970458984375, 0.0022735595703125, 0.01123046875, -0.033935546875, 0.011474609375, 0.0186767578125, -0.006683349609375, 0.01171875, 0.006805419921875, -0.00616455078125, -0.011962890625, 0.01019287109375, -0.0159912109375, 0.0150...
[ 11249, 47, 15549, 142, 12989, 111, 5303, 7, 502, 4867, 765, 161740, 17514, 17721, 77336, 136, 142424, 8121, 425, 53, 133063, 37440, 34292, 1022, 105950, 106, 113, 116, 3444, 80836, 91084, 76172, 90173, 114689, 71, 28282, 12638, 29954, 19562...
[ 0.1070556640625, 0.0762939453125, 0.251708984375, 0.0831298828125, 0.2509765625, 0.1331787109375, 0.25048828125, 0.09588623046875, 0.1566162109375, 0.1844482421875, 0.00634765625, 0.163818359375, 0.10235595703125, 0.09808349609375, 0.1572265625, 0.01123046875, 0.0836181640625, 0.07...
embed
48130976_c0
48130976
prolog
0
Title: List in Prolog with elements in round brackets Problem title: List in Prolog with elements in round brackets Tags: list, prolog Problem: List in Prolog with elements in round brackets Good Morning I have list similiar to this: [(1-4), (2-4), (3-4)] . I'd like to write only first/second/third part of round bracke...
List in Prolog with elements in round brackets List in Prolog with elements in round brackets list prolog List Prolog write_list Head Tail List in Prolog with elements in round brackets Good Morning I have list similiar to this: [(1-4), (2-4), (3-4)] . I'd like to write only first/second/third part of round bracket. I ...
[ -0.004730224609375, 0.005645751953125, -0.0177001953125, 0.01348876953125, -0.000701904296875, 0.0032501220703125, -0.00335693359375, 0.01416015625, 0.006256103515625, 0.0169677734375, -0.0096435546875, -0.004302978515625, -0.0164794921875, 0.0177001953125, -0.00115203857421875, 0.0089...
[ 32036, 23, 1250, 4867, 678, 80854, 68807, 1620, 27853, 5303, 502, 33022, 6562, 44816, 1218, 379, 163710, 76465, 147, 179437, 4700, 11565, 130913, 1884, 4734, 5117, 191633, 95037, 2831, 54397, 32354, 28271, 129285, 87242, 20444, 140992, 106, 2...
[ 0.175537109375, 0.042510986328125, 0.1585693359375, 0.22021484375, 0.041259765625, 0.177978515625, 0.2020263671875, 0.1982421875, 0.17333984375, 0.161376953125, 0.10693359375, 0.144287109375, 0.171875, 0.1041259765625, 0.0914306640625, 0.0634765625, 0.0887451171875, 0.0576171875, ...
embed
61804572_c0
61804572
prolog
0
Title: Arithmetics in Prolog, represent a number using powers of 2 Problem title: Arithmetics in Prolog, represent a number using powers of 2 Tags: prolog, coin-change Problem: Arithmetics in Prolog, represent a number using powers of 2 I have two numbers, let's name them N and K , and I want to write N using K powers ...
Arithmetics in Prolog, represent a number using powers of 2 Arithmetics in Prolog, represent a number using powers of 2 prolog coin-change powers Arithmetics Prolog Arithmetics in Prolog, represent a number using powers of 2 I have two numbers, let's name them N and K , and I want to write N using K powers of 2. For ex...
[ 0.004791259765625, -0.0291748046875, 0.0027618408203125, 0.0115966796875, 0.01123046875, 0.0299072265625, -0.037841796875, 0.0107421875, -0.005767822265625, -0.00946044921875, 0.004486083984375, -0.00057220458984375, -0.0159912109375, 0.0234375, 0.000919342041015625, 0.01611328125, 0...
[ 1172, 8962, 282, 41637, 23, 1250, 4867, 33636, 14012, 17368, 14537, 7, 111, 116, 502, 43780, 152028, 765, 6626, 101935, 9351, 541, 136, 341, 3444, 33022, 787, 483, 201, 5809, 2203, 997, 2389, 1528, 5608, 140992, 133063, 304, 617, 11814, ...
[ 0.01898193359375, 0.159423828125, 0.1170654296875, 0.0714111328125, 0.06298828125, 0.16845703125, 0.25927734375, 0.2125244140625, 0.156982421875, 0.09417724609375, 0.2098388671875, 0.04425048828125, 0.097900390625, 0.20751953125, 0.126953125, 0.1553955078125, 0.145263671875, 0.0056...
embed
70593036_c0
70593036
prolog
0
Title: Comparing a list of integers with a number prolog Problem title: Comparing a list of integers with a number prolog Tags: prolog Problem: Comparing a list of integers with a number prolog I have to define a predicate which takes as input a list of integers, and instantiates X with the elements of L smaller than 1...
Comparing a list of integers with a number prolog Comparing a list of integers with a number prolog prolog Comparing Comparing a list of integers with a number prolog I have to define a predicate which takes as input a list of integers, and instantiates X with the elements of L smaller than 10, and Y with the elements ...
[ 0.0019073486328125, -0.0103759765625, -0.01141357421875, 0.01287841796875, -0.0301513671875, 0.0091552734375, -0.000743865966796875, -0.00110626220703125, 0.007232666015625, 0.02001953125, 0.005157470703125, 0.0038299560546875, 0.00049591064453125, -0.0031280517578125, -0.001823425292968...
[ 113307, 214, 5303, 892, 26255, 678, 14012, 502, 4867, 111, 765, 61924, 1653, 2063, 67, 51776, 107730, 10, 34648, 101426, 1193, 80854, 339, 164917, 3501, 209, 136, 990, 117396, 105950, 4068, 84797, 132, 866, 4, 27781, 140992, 16487 ]
[ 0.173828125, 0.017333984375, 0.138671875, 0.135986328125, 0.106201171875, 0.0985107421875, 0.1246337890625, 0.1302490234375, 0.2015380859375, 0.003814697265625, 0.00360107421875, 0.122314453125, 0.14697265625, 0.1851806640625, 0.0877685546875, 0.024566650390625, 0.143310546875, 0.0...
embed
41988973_c1
41988973
prolog
1
Ds = [X|Ds0], ld_acc(Xs, Acc, Ds0) ; Acc1 = [X|Acc], ld_acc(Xs, Acc1, Ds) ). This cannot work because when I check that an element is member of accumulator I remove only one occurrence of each element: if I have three times the same element in the first argument, I am left with two. If I could change the element in th...
Ds = [X|Ds0], ld_acc(Xs, Acc, Ds0) ; Acc1 = [X|Acc], ld_acc(Xs, Acc1, Ds) ). This cannot work because when I check that an element is member of accumulator I remove only one occurrence of each element: if I have three times the same element in the first argument, I am left with two. If I could change the element in th...
[ -0.0147705078125, 0.0169677734375, -0.005645751953125, -0.01190185546875, -0.020263671875, 0.0166015625, 0.0027008056640625, 0.01153564453125, 0.017822265625, -0.046630859375, 0.0211181640625, 0.0240478515625, 0.0157470703125, 0.015625, -0.0003204345703125, -0.004425048828125, 0.0042...
[ 391, 7, 2203, 1542, 58745, 397, 2389, 96, 71, 10060, 29899, 77495, 418, 3293, 53418, 4488, 12765, 12830, 83, 32786, 183278, 1290, 87388, 4734, 1632, 74918, 42, 111, 12638, 17262, 20028, 5701, 5117, 10750, 25737, 6626, 15549, 70, 23, 51139...
[ 0.146484375, 0.1343994140625, 0.06109619140625, 0.1185302734375, 0.033782958984375, 0.0921630859375, 0.1175537109375, 0.0103759765625, 0.03765869140625, 0.07806396484375, 0.1337890625, 0.1119384765625, 0.0870361328125, 0.0772705078125, 0.1392822265625, 0.1085205078125, 0.155395507812...
embed
73180564_c0
73180564
prolog
0
Title: Split a list into list of lists in Prolog Problem title: Split a list into list of lists in Prolog Tags: swi-prolog, prolog Problem: Split a list into list of lists in Prolog I have a list of predicates: [patient(204,4,2),patient(203,3,2),patient(303,7,3),patient(302,6,3),patient(404,12,4),patient(403,11,4),pati...
Split a list into list of lists in Prolog Split a list into list of lists in Prolog swi-prolog prolog Split Prolog Split a list into list of lists in Prolog I have a list of predicates: I want to have a list of lists depending on the 3rd argument of each predicate:
[ 0.006072998046875, -0.010009765625, 0.0067138671875, 0.001617431640625, -0.035400390625, 0.0191650390625, -0.00140380859375, 0.01324462890625, -0.000720977783203125, -0.021728515625, -0.00010728836059570312, -0.003326416015625, -0.0152587890625, -0.007110595703125, 0.00836181640625, 0....
[ 46474, 5303, 3934, 111, 7, 1250, 4867, 23, 2452, 3454, 502, 1653, 2063, 1636, 3444, 765, 96819, 138, 4216, 10750, 12638, 67 ]
[ 0.2158203125, 0.24365234375, 0.1446533203125, 0.05413818359375, 0.053741455078125, 0.16357421875, 0.2215576171875, 0.0187225341796875, 0.11566162109375, 0.11590576171875, 0.11737060546875, 0.1280517578125, 0.146728515625, 0.0640869140625, 0.0499267578125, 0.0270233154296875, 0.060577...
embed
46018511_c0
46018511
prolog
0
Title: Prolog: Redundant results in clauses involving anonymous variables Problem title: Prolog: Redundant results in clauses involving anonymous variables Tags: prolog-anonymous-variable, prolog Problem: Prolog: Redundant results in clauses involving anonymous variables Consider the following Prolog program. a(X) :- b...
Prolog: Redundant results in clauses involving anonymous variables Prolog: Redundant results in clauses involving anonymous variables prolog-anonymous-variable prolog Prolog Redundant Prolog: Redundant results in clauses involving anonymous variables Consider the following Prolog program. Running the query: in SWI-Prol...
[ 0.014892578125, 0.0001773834228515625, 0.00616455078125, 0.01019287109375, 0.00067901611328125, -0.005462646484375, 0.0032501220703125, 0.00384521484375, 0.0032501220703125, -0.010009765625, -0.01708984375, -0.02001953125, -0.0103759765625, 0.003204345703125, 0.000278472900390625, -0.0...
[ 1250, 4867, 6096, 35405, 18, 50339, 70731, 90, 52184, 77336, 502, 45757, 21690, 10821, 1528, 41, 159, 38969, 10752, 2046, 17262, 756, 1193, 2203, 615, 959, 517, 56282, 214, 30646, 11001, 16750, 44084, 87235, 1363, 51339 ]
[ 0.1373291015625, 0.22216796875, 0.0821533203125, 0.2000732421875, 0.03631591796875, 0.1754150390625, 0.17626953125, 0.070556640625, 0.16650390625, 0.168701171875, 0.07965087890625, 0.1077880859375, 0.054534912109375, 0.059417724609375, 0.09442138671875, 0.08502197265625, 0.0173187255...
embed
55905560_c0
55905560
prolog
0
Title: How can I create this rule in Prolog? Problem title: How can I create this rule in Prolog? Tags: prolog Problem: How can I create this rule in Prolog? I need a help for create this rule in Prolog. This is the question: Create fact and rule for Prolog. burger is a food. sandwich is a food. pizza is a food. sandwi...
How can I create this rule in Prolog? How can I create this rule in Prolog? prolog How Prolog How can I create this rule in Prolog? I need a help for create this rule in Prolog. This is the question: Create fact and rule for Prolog. burger is a food. sandwich is a food. pizza is a food. sandwich is a lunch. pizza is a ...
[ 0.0181884765625, 0.00677490234375, -0.0145263671875, 0.0294189453125, -0.015380859375, 0.013427734375, 0.00775146484375, -0.0179443359375, -0.0045166015625, -0.0004215240478515625, 0.006378173828125, -0.0096435546875, -0.0167236328125, -0.0086669921875, 0.0172119140625, -0.013122558593...
[ 11249, 831, 28282, 903, 79986, 23, 1250, 4867, 87, 502, 3871, 4358, 151313, 15824, 136, 100, 57736, 83, 10, 15381, 169717, 32960, 40781, 94000, 11907, 109911, 33172, 64113, 2174, 18244, 35978, 95486, 674, 26785 ]
[ 0.061065673828125, 0.0714111328125, 0.2005615234375, 0.1240234375, 0.2193603515625, 0.10888671875, 0.14697265625, 0.2259521484375, 0.0222930908203125, 0.074462890625, 0.01422119140625, 0.0743408203125, 0.13427734375, 0.16943359375, 0.111572265625, 0.04522705078125, 0.218017578125, ...
embed
40978674_c2
40978674
prolog
2
means to ask user questions and then to assert new facts into the system. But the predict "new_rules" cannot be satisfied because "011111110" or "02222220" cannot be print onto the screen,thus the system cannot use the answer!! I just do not know why!!Thanks very much for all your Code signals: prolog, run:-animal_is,...
means to ask user questions and then to assert new facts into the system. But the predict "new_rules" cannot be satisfied because "011111110" or "02222220" cannot be print onto the screen,thus the system cannot use the answer!! I just do not know why!!Thanks very much for all your Code signals: prolog, run:-animal_is,...
[ -0.0015106201171875, 0.0031280517578125, -0.01214599609375, 0.031982421875, -0.006927490234375, 0.01556396484375, -0.000919342041015625, 0.014404296875, 0.01116943359375, -0.018310546875, 0.003143310546875, 0.0030364990234375, 0.0086669921875, -0.005523681640625, 0.01708984375, -0.0004...
[ 26950, 47, 26458, 38937, 17582, 237, 33657, 3525, 15824, 7, 3934, 5426, 4966, 92054, 54936, 13500, 90, 53418, 186, 214521, 6637, 136485, 159019, 963, 707, 9550, 132537, 61107, 58, 28412, 188, 49119, 4527, 35166, 1146, 959, 3714, 15400, 756,...
[ 0.1378173828125, 0.013580322265625, 0.1572265625, 0.1705322265625, 0.1575927734375, 0.055145263671875, 0.16259765625, 0.1649169921875, 0.15869140625, 0.0633544921875, 0.0270233154296875, 0.1544189453125, 0.05267333984375, 0.302734375, 0.176025390625, 0.207763671875, 0.1429443359375, ...
embed
25830113_c0
25830113
prolog
0
Title: Prolog Recursive List Comparison Problem title: Prolog Recursive List Comparison Tags: list, prolog, recursion Problem: Prolog Recursive List Comparison I just started Prolog and for practice I'm trying to compare two lists and see if the first list is greater than the second list by one element. So far I got th...
Prolog Recursive List Comparison Prolog Recursive List Comparison list prolog recursion Prolog Recursive List Comparison one_longer Prolog Recursive List Comparison I just started Prolog and for practice I'm trying to compare two lists and see if the first list is greater than the second list by one element. So far I g...
[ 0.006622314453125, 0.02734375, -0.0018310546875, 0.0135498046875, -0.0086669921875, -0.006622314453125, -0.0057373046875, 0.0186767578125, 0.016357421875, -0.00787353515625, 0.0029449462890625, 0.0035247802734375, 0.0011138916015625, 0.0255126953125, 0.0186767578125, -0.0128173828125, ...
[ 1250, 4867, 853, 48650, 5844, 32036, 113307, 40514, 5303, 502, 195625, 1632, 10617, 56, 26859, 41361, 31577, 69101, 6626, 1957, 5117, 117396, 3501, 17932, 12830, 3647, 7225, 4488, 2499, 678, 1286, 442, 40956, 7, 54241, 73342, 15400, 123087, ...
[ 0.150634765625, 0.2249755859375, 0.0149688720703125, 0.16357421875, 0.06268310546875, 0.1907958984375, 0.1656494140625, 0.0596923828125, 0.1856689453125, 0.1248779296875, 0.2054443359375, 0.10137939453125, 0.1461181640625, 0.03118896484375, 0.00665283203125, 0.0361328125, 0.058166503...
embed
27708860_c0
27708860
prolog
0
Title: Prolog more result in query Problem title: Prolog more result in query Tags: prolog Problem: Prolog more result in query I have this rules and facts - easy. alergicky(novotny, mleko). alergicky(novotny, korysi). alergicky(cerna, lepek). alergicky(cerna, ryby). obsahuje(kapr, ryby). obsahuje(krupice, mleko). obsa...
Prolog more result in query Prolog more result in query prolog Prolog Prolog more result in query I have this rules and facts - easy. And now I ask and prolog give me this. -But I need two results, becouse true is X = chobotnice too. Please how can I ask and prolog give me right result?
[ 0.0230712890625, 0.00738525390625, 0.0025634765625, 0.0189208984375, 0.00152587890625, 0.0093994140625, -0.0101318359375, 0.00811767578125, 0.00701904296875, -0.038330078125, 0.00037384033203125, -0.0172119140625, -0.0177001953125, 0.01458740234375, 0.0008697509765625, 0.00112915039062...
[ 1250, 4867, 1286, 16750, 23, 41, 1294, 502, 765, 903, 91736, 136, 15824, 23468, 26458, 8337, 163, 82212, 3871, 6626, 50339, 29568, 83, 1193, 2203, 681, 9190, 3466, 5792, 3642, 7108 ]
[ 0.174560546875, 0.2880859375, 0.1619873046875, 0.2362060546875, 0.0777587890625, 0.1544189453125, 0.1290283203125, 0.135009765625, 0.032928466796875, 0.0208282470703125, 0.11181640625, 0.043792724609375, 0.07659912109375, 0.097900390625, 0.1673583984375, 0.068603515625, 0.03884887695...
embed
12629228_c0
12629228
prolog
0
Title: Does Prolog have a condition and restart system like Common Lisp? Problem title: Does Prolog have a condition and restart system like Common Lisp? Tags: iso-prolog, prolog Problem: Does Prolog have a condition and restart system like Common Lisp? Common Lisp allows exception handling through conditions and resta...
Does Prolog have a condition and restart system like Common Lisp? Does Prolog have a condition and restart system like Common Lisp? iso-prolog prolog Does Prolog Common Lisp Does Prolog have a condition and restart system like Common Lisp? Common Lisp allows exception handling through conditions and restarts . In rough...
[ 0.0257568359375, 0.016357421875, -0.004638671875, 0.01513671875, -0.0081787109375, 0.00057220458984375, 0.01068115234375, -0.005279541015625, 0.00141143798828125, -0.03125, 0.018310546875, 0.00445556640625, -0.02099609375, 0.002655029296875, 0.0284423828125, -0.0018768310546875, 0.00...
[ 1250, 4867, 35431, 456, 17137, 5426, 151301, 1261, 7008, 765, 136, 1884, 13882, 3454, 502, 114864, 131527, 45064, 8305, 27289, 10588, 67987, 166904, 32354, 104250, 4460, 5372, 831, 28288, 42294, 6488, 172337, 18645, 21373, 88303, 144573, 1653, ...
[ 0.182373046875, 0.2646484375, 0.1868896484375, 0.06793212890625, 0.1844482421875, 0.123046875, 0.148193359375, 0.1483154296875, 0.180908203125, 0.0523681640625, 0.03778076171875, 0.0219268798828125, 0.06500244140625, 0.1326904296875, 0.12939453125, 0.06268310546875, 0.1929931640625, ...
embed
36679856_c0
36679856
prolog
0
Title: Prolog: subsets facts not working Problem title: Prolog: subsets facts not working Tags: prolog Problem: Prolog: subsets facts not working I've never written in Prolog before. I have to provide facts so that when it runs it displays: ?- subset([a,b],[a,c,d,b]). true. ?-include([],[a,b]). true. So far, I've writt...
Prolog: subsets facts not working Prolog: subsets facts not working prolog Prolog ERROR Undefined DWIM Prolog: subsets facts not working I've never written in Prolog before. I have to provide facts so that when it runs it displays: So far, I've written this: But include doesn't work when I write include([],[a,b]). . It...
[ 0.033203125, 0.0238037109375, 0.0260009765625, 0.017578125, -0.031494140625, 0.0087890625, -0.000095367431640625, -0.006134033203125, -0.00156402587890625, 0.01251220703125, 0.0260009765625, 0.0198974609375, -0.0203857421875, 0.0184326171875, 0.0081787109375, -0.0036163330078125, 0.0...
[ 1250, 4867, 1614, 3509, 7, 15824, 959, 20697, 502, 151206, 24638, 79912, 5983, 30439, 17199, 59121, 23, 22691, 127877, 44116, 2060, 903, 26698, 22027, 18, 4488, 3229, 33022, 132, 1065, 11, 275, 45831, 4358, 77947 ]
[ 0.173828125, 0.2490234375, 0.202880859375, 0.263916015625, 0.09234619140625, 0.194091796875, 0.1029052734375, 0.151611328125, 0.1435546875, 0.09368896484375, 0.033966064453125, 0.029541015625, 0.174072265625, 0.08599853515625, 0.1456298828125, 0.0806884765625, 0.0176849365234375, 0...
embed
30416465_c0
30416465
prolog
0
Title: Prolog not giving correct answer Problem title: Prolog not giving correct answer Tags: prolog-toplevel, prolog Problem: Prolog not giving correct answer I am learning Prolog. I wrote some simple facts. But it seems that Prolog is not giving me right answers. Please help me understand what I am doing wrong here. ...
Prolog not giving correct answer Prolog not giving correct answer prolog-toplevel prolog Prolog City Prolog not giving correct answer I am learning Prolog. I wrote some simple facts. But it seems that Prolog is not giving me right answers. Please help me understand what I am doing wrong here. facts - weather.pl When I ...
[ 0.029296875, 0.00726318359375, 0.0224609375, 0.0174560546875, -0.00714111328125, 0.0267333984375, 0.002105712890625, 0.0011444091796875, 0.0052490234375, -0.007415771484375, 0.013916015625, 0.01336669921875, -0.010009765625, 0.0130615234375, -0.0101318359375, -0.01080322265625, 0.007...
[ 1250, 4867, 959, 68772, 26785, 35166, 502, 13784, 67919, 6406, 52080, 54397, 8781, 15824, 37202, 7108, 4358, 28219, 44691, 92949, 2424, 11675, 903, 2452, 3454, 28960, 126684, 4734, 127887, 237, 20133, 191, 4084, 21, 83, 2843, 24814, 44084, ...
[ 0.1593017578125, 0.27978515625, 0.0919189453125, 0.0963134765625, 0.13818359375, 0.17333984375, 0.0926513671875, 0.055145263671875, 0.15185546875, 0.118896484375, 0.05267333984375, 0.009368896484375, 0.023040771484375, 0.1265869140625, 0.0091552734375, 0.0670166015625, 0.004547119140...
embed
45360628_c1
45360628
prolog
1
076] List1 = [_1062, _1068, _1074, a|_1082] List1 = [_1062, _1068, _1074, _1080, a|_1088] Is this something about the specific Prolog version I am using, or am I missing something very simple? EDIT I was aware that a similar question was posed here , but I did not manage to fully understand the answer (nor the question...
076] List1 = [_1062, _1068, _1074, a|_1082] List1 = [_1062, _1068, _1074, _1080, a|_1088] Is this something about the specific Prolog version I am using, or am I missing something very simple? EDIT I was aware that a similar question was posed here , but I did not manage to fully understand the answer (nor the question...
[ 0.0201416015625, 0.022216796875, 0.01202392578125, 0.001190185546875, -0.017822265625, 0.0004329681396484375, -0.02392578125, 0.01190185546875, 0.0169677734375, -0.0031890869140625, -0.0020294189453125, -0.0023193359375, -0.0086669921875, 0.0120849609375, 0.01129150390625, -0.006317138...
[ 4719, 910, 268, 32036, 418, 2203, 963, 10837, 16028, 16360, 10, 69139, 90173, 168630, 12772, 2071, 903, 9844, 29458, 1250, 4867, 11389, 17368, 132283, 8781, 28219, 84079, 190647, 67919, 35166, 28864, 26073, 7, 159, 38969, 9, 10752, 61595, 7...
[ 0.1033935546875, 0.175537109375, 0.0311737060546875, 0.2568359375, 0.1202392578125, 0.06549072265625, 0.1201171875, 0.220947265625, 0.231689453125, 0.2039794921875, 0.113525390625, 0.1363525390625, 0.100341796875, 0.2427978515625, 0.2587890625, 0.0032958984375, 0.076416015625, 0.00...
embed
7706525_c0
7706525
prolog
0
Title: Retrieving all the numbers from a given interval in Prolog Problem title: Retrieving all the numbers from a given interval in Prolog Tags: clpfd, prolog Problem: Retrieving all the numbers from a given interval in Prolog I am new into the world of Prolog, and I would like to write a rule that return all the elem...
Retrieving all the numbers from a given interval in Prolog Retrieving all the numbers from a given interval in Prolog clpfd prolog a Retrieving Prolog Low High Retrieving all the numbers from a given interval in Prolog I am new into the world of Prolog, and I would like to write a rule that return all the elements in a...
[ -0.006439208984375, -0.024169921875, 0.003570556640625, 0.01055908203125, 0.01324462890625, 0.0277099609375, 0.0031280517578125, 0.019287109375, 0.007537841796875, -0.00885009765625, 0.00098419189453125, -0.00689697265625, -0.0181884765625, 0.0223388671875, 0.01336669921875, -0.0185546...
[ 853, 97351, 6496, 756, 70, 101935, 1295, 34475, 51514, 23, 1250, 4867, 39557, 71, 502, 61187, 19694, 8999, 1884, 33022, 79986, 30646, 80854, 29458, 37457, 150661, 5443, 10644, 5775, 31, 1542, 116, 21162, 5608, 138, 7068, 1398, 51515, 44691,...
[ 0.05938720703125, 0.159423828125, 0.07696533203125, 0.123779296875, 0.00494384765625, 0.19482421875, 0.1025390625, 0.06732177734375, 0.2398681640625, 0.03564453125, 0.1614990234375, 0.2548828125, 0.0252227783203125, 0.0697021484375, 0.1162109375, 0.1092529296875, 0.1395263671875, 0...
embed
41414998_c0
41414998
prolog
0
Title: printing pairs of a list in SWI-prolog Problem title: printing pairs of a list in SWI-prolog Tags: prolog Problem: printing pairs of a list in SWI-prolog basically, I want to print pairs from one list like this ?- [1 2 3 4 5,R] the output is R = [1, 2] R = [1, 3] R = [1, 4] R = [1, 5] R = [2, 3] R = [2, 4] R = [...
printing pairs of a list in SWI-prolog printing pairs of a list in SWI-prolog prolog SWI-prolog N-1 printing pairs of a list in SWI-prolog basically, I want to print pairs from one list like this the output is I used the code that creates subsets and modified it and I would call sub(2,[1,2,3,4,5],R) but is there a way ...
[ -0.01202392578125, 0.0103759765625, 0.0205078125, 0.00970458984375, -0.00506591796875, 0.0164794921875, -0.0223388671875, 0.0027313232421875, 0.00958251953125, -0.006866455078125, 0.0191650390625, -0.01287841796875, 0.00592041015625, -0.017822265625, 0.000911712646484375, 0.00988769531...
[ 2448, 1916, 80836, 7, 111, 5303, 159, 38969, 3454, 4867, 502, 541, 5759, 23, 3444, 28412, 1295, 1632, 1884, 903, 140992, 11814, 18151, 28282, 1614, 3509, 73197, 11782, 54753, 133063, 363, 80389, 1052, 3917, 15490, 105416 ]
[ 0.1845703125, 0.004058837890625, 0.2408447265625, 0.1212158203125, 0.030670166015625, 0.2113037109375, 0.08270263671875, 0.201416015625, 0.130859375, 0.1849365234375, 0.1068115234375, 0.093017578125, 0.130859375, 0.0281829833984375, 0.06158447265625, 0.2015380859375, 0.0650634765625,...
embed
29403291_c1
29403291
prolog
1
Ts). Ts = [1, 1, 1, 1] ; I understand the meaning of some of the variable names in rules/facts: turing(Tape0, Tape) tape0 is the input tape tape is the output tape rule(Q0, Sym, Q1, NewSym, Action) Q0: start state Sym: symbol read Q1: end state NewSym: symbol to write Action: how to move the head I do not understand t...
Ts). Ts = [1, 1, 1, 1] ; I understand the meaning of some of the variable names in rules/facts: turing(Tape0, Tape) tape0 is the input tape tape is the output tape rule(Q0, Sym, Q1, NewSym, Action) Q0: start state Sym: symbol read Q1: end state NewSym: symbol to write Action: how to move the head I do not understand t...
[ 0.0247802734375, -0.005584716796875, 0.0022430419921875, 0.00799560546875, -0.007080078125, -0.013427734375, -0.01123046875, -0.00396728515625, 0.0152587890625, -0.0245361328125, 0.0035400390625, 0.011962890625, -0.005218505859375, -0.003997802734375, -0.01312255859375, 0.0149536132812...
[ 384, 7, 194, 2203, 68252, 106, 87, 28219, 91084, 3060, 77336, 123055, 23, 91736, 64, 114700, 109561, 9874, 1081, 2389, 50266, 13, 62690, 83, 107730, 140992, 79986, 2737, 4843, 39, 2396, 418, 2356, 4650, 57945, 4034, 11341, 26582, 12301, 8...
[ 0.18994140625, 0.1572265625, 0.06500244140625, 0.1064453125, 0.037078857421875, 0.0701904296875, 0.017578125, 0.1644287109375, 0.21484375, 0.0263519287109375, 0.264892578125, 0.1527099609375, 0.008544921875, 0.1851806640625, 0.036041259765625, 0.155029296875, 0.26318359375, 0.08215...
embed
51455252_c0
51455252
prolog
0
Title: create a list in prolog in range of two numbers Problem title: create a list in prolog in range of two numbers Tags: prolog Problem: create a list in prolog in range of two numbers I want to build list of numbers that are in range of two given numbers. For example: betweenRange(1,5,X) will give the answer: X=[1,...
create a list in prolog in range of two numbers create a list in prolog in range of two numbers prolog List N2New N2-1 create a list in prolog in range of two numbers I want to build list of numbers that are in range of two given numbers. For example: betweenRange(1,5,X) will give the answer: X=[1,2,3,4,5] . any idea h...
[ -0.013671875, 0.016845703125, -0.0024871826171875, 0.0167236328125, 0.00640869140625, 0.042724609375, -0.015625, 0.01287841796875, -0.0057373046875, 0.00167083740234375, 0.01263427734375, -0.0137939453125, 0.004180908203125, -0.006622314453125, 0.0245361328125, 0.005706787109375, 0.0...
[ 28282, 10, 5303, 23, 502, 4867, 37457, 111, 6626, 101935, 32036, 541, 304, 46568, 146971, 3444, 45367, 621, 34475, 17721, 1052, 51459, 57626, 1542, 8337, 35166, 1193, 1369, 133063, 363, 80389, 6528, 3642, 54, 450, 37842, 6863, 959, 20697, ...
[ 0.1510009765625, 0.0379638671875, 0.2462158203125, 0.08251953125, 0.1654052734375, 0.262451171875, 0.2322998046875, 0.061004638671875, 0.143310546875, 0.183837890625, 0.162841796875, 0.019439697265625, 0.05218505859375, 0.049072265625, 0.1337890625, 0.09442138671875, 0.197998046875, ...
embed
10402422_c0
10402422
prolog
0
Title: Error in PROLOG code Problem title: Error in PROLOG code Tags: prolog Problem: Error in PROLOG code I am new to prolog. I want my code in PROLOG to produce the expected output given below. Can some one please tell me where I am going wrong. The code is basically to remove duplicates and produce o/p in required f...
Error in PROLOG code Error in PROLOG code prolog Error PROLOG remove_dups _L2 Error in PROLOG code I am new to prolog. I want my code in PROLOG to produce the expected output given below. Can some one please tell me where I am going wrong. The code is basically to remove duplicates and produce o/p in required format. e...
[ 0.0034637451171875, 0.017822265625, 0.0057373046875, -0.0029449462890625, -0.01019287109375, -0.00011777877807617188, -0.021240234375, -0.00775146484375, 0.00144195556640625, -0.0223388671875, -0.009521484375, 0.01116943359375, 0.0174560546875, -0.00872802734375, 0.0078125, 0.022827148...
[ 212059, 23, 10514, 47510, 18151, 502, 4867, 87388, 693, 6423, 866, 304, 3525, 3444, 27489, 70, 84751, 140992, 34475, 35064, 22936, 14192, 444, 7730, 44691, 198343, 171763, 1636, 36, 64, 254, 56065, 9384 ]
[ 0.1759033203125, 0.09375, 0.1865234375, 0.263916015625, 0.1956787109375, 0.1431884765625, 0.2236328125, 0.1646728515625, 0.165771484375, 0.149658203125, 0.0986328125, 0.1805419921875, 0.027496337890625, 0.053253173828125, 0.08746337890625, 0.003021240234375, 0.125, 0.1318359375, ...
embed
76278665_c0
76278665
prolog
0
Title: Write a prolog program to find the sum of inverse of each number of n natural number Problem title: Write a prolog program to find the sum of inverse of each number of n natural number Tags: prolog Problem: Write a prolog program to find the sum of inverse of each number of n natural number Write a Prolog progra...
Write a prolog program to find the sum of inverse of each number of n natural number Write a prolog program to find the sum of inverse of each number of n natural number prolog Write N-1 Write a prolog program to find the sum of inverse of each number of n natural number Write a Prolog program to find the sum of invers...
[ -0.0135498046875, 0.00823974609375, 0.00885009765625, 0.0234375, -0.006988525390625, 0.00946044921875, 0.01190185546875, 0.0341796875, 0.00909423828125, -0.02783203125, 0.001983642578125, -0.002838134765625, -0.006011962890625, -0.00115203857421875, 0.0286865234375, 0.017578125, 0.02...
[ 601, 18781, 502, 4867, 1528, 7413, 10554, 111, 23, 37676, 12638, 14012, 653, 6083, 541, 5759, 1250, 28219, 3642, 86869, 37842, 55300, 152018, 7210 ]
[ 0.046783447265625, 0.123291015625, 0.139404296875, 0.2159423828125, 0.171875, 0.0933837890625, 0.2119140625, 0.067138671875, 0.1666259765625, 0.275634765625, 0.1156005859375, 0.133544921875, 0.1351318359375, 0.191162109375, 0.1221923828125, 0.1729736328125, 0.1470947265625, 0.10095...
embed
73602036_c1
73602036
prolog
1
>= X. % we have a sequence of states sequence_correct([[X1, X2]]) :- win(X1, X2). sequence_correct([[X1, X2], [Y1, Y2] | T]) :- next_state(X1, X2, Y1, Y2), sequence_correct([[Y1, Y2] | T]). % find X such as there is a sequence of 3 states, and there is no Y such as % Y < X => X is minimum min(X) :- sequence_correct([[8...
>= X. % we have a sequence of states sequence_correct([[X1, X2]]) :- win(X1, X2). sequence_correct([[X1, X2], [Y1, Y2] | T]) :- next_state(X1, X2, Y1, Y2), sequence_correct([[Y1, Y2] | T]). % find X such as there is a sequence of 3 states, and there is no Y such as % Y < X => X is minimum min(X) :- sequence_correct([[8...
[ -0.006683349609375, 0.0235595703125, 0.0054931640625, 0.0302734375, -0.003082275390625, 0.005584716796875, 0.005340576171875, -0.00604248046875, -0.001861572265625, -0.0206298828125, 0.0194091796875, 0.023193359375, 0.000823974609375, 0.01409912109375, -0.0016326904296875, -0.012329101...
[ 977, 1369, 1193, 1745, 642, 765, 40, 944, 3956, 111, 117249, 32399, 15390, 1542, 418, 4, 90173, 15772, 19916, 10461, 1723, 990, 384, 11737, 61340, 304, 7413, 6044, 138, 2685, 110, 4426, 83, 15440, 881, 1019, 1328, 4966, 104272, 9790, 20...
[ 0.0928955078125, 0.08770751953125, 0.1832275390625, 0.134033203125, 0.0128173828125, 0.06951904296875, 0.08251953125, 0.1502685546875, 0.1158447265625, 0.0662841796875, 0.2281494140625, 0.1851806640625, 0.1480712890625, 0.15283203125, 0.08203125, 0.001800537109375, 0.1458740234375, ...
embed
69620039_c0
69620039
prolog
0
Title: Split a list in prolog to atoms and integers Problem title: Split a list in prolog to atoms and integers Tags: predicate, prolog Problem: Split a list in prolog to atoms and integers I am new to prolog and trying to make a predicate to separate a list in to atoms and integers but I have been try different ways f...
Split a list in prolog to atoms and integers Split a list in prolog to atoms and integers predicate prolog Split Split a list in prolog to atoms and integers I am new to prolog and trying to make a predicate to separate a list in to atoms and integers but I have been try different ways for a while now but no where is t...
[ 0.01123046875, -0.017822265625, 0.0029449462890625, 0.028564453125, -0.041748046875, 0.02783203125, 0.000644683837890625, 0.0284423828125, -0.0098876953125, -0.00311279296875, 0.00360107421875, 0.00160980224609375, 0.00238037109375, 0.01123046875, -0.004974365234375, -0.00714111328125,...
[ 46474, 5303, 23, 502, 4867, 47, 34627, 7, 136, 892, 1653, 2063, 26255, 3525, 31577, 67, 84797, 27781, 16940, 37202, 62822, 3714, 2828, 1065, 363, 18, 1019, 141, 2389, 11, 758, 177, 90173, 12078, 69728, 2203, 44401, 71928 ]
[ 0.2235107421875, 0.2335205078125, 0.069580078125, 0.17041015625, 0.2216796875, 0.1043701171875, 0.224853515625, 0.042572021484375, 0.110107421875, 0.1463623046875, 0.1392822265625, 0.1500244140625, 0.1280517578125, 0.037689208984375, 0.0170440673828125, 0.1103515625, 0.189697265625, ...
embed
29582415_c0
29582415
prolog
0
Title: How to check non existence in prolog Problem title: How to check non existence in prolog Tags: prolog Problem: How to check non existence in prolog I have a model of a tower defined in prolog: Each block has a position block(ID, POS). The level of a block is calculated in a different way. rows(3). block(a, 1). b...
How to check non existence in prolog How to check non existence in prolog prolog How How to check non existence in prolog I have a model of a tower defined in prolog: Each block has a position block(ID, POS). The level of a block is calculated in a different way. In this case there would be space for 3 blocks (rows(3))...
[ -0.010009765625, 0.027587890625, 0.00457763671875, -0.0022125244140625, -0.0130615234375, -0.00141143798828125, 0.003753662109375, 0.006805419921875, 0.0052490234375, -0.020751953125, 0.0185546875, 0.0023651123046875, 0.01275634765625, -0.01708984375, -0.0172119140625, 0.01483154296875...
[ 11249, 47, 12765, 351, 116311, 23, 502, 4867, 3299, 6488, 61924, 46389, 19069, 7146, 54602, 17366, 74481, 12921, 32628, 138, 15555, 69829, 363, 55300, 30646, 116, 4092, 1398 ]
[ 0.044677734375, 0.0775146484375, 0.23681640625, 0.198974609375, 0.2384033203125, 0.04449462890625, 0.155029296875, 0.2322998046875, 0.140625, 0.1312255859375, 0.0755615234375, 0.138427734375, 0.1337890625, 0.067138671875, 0.13916015625, 0.1578369140625, 0.07537841796875, 0.03704833...
embed
19798844_c0
19798844
prolog
0
Title: Finding the max in a list - Prolog Problem title: Finding the max in a list - Prolog Tags: prolog Problem: Finding the max in a list - Prolog I was just introduced to Prolog and am trying to write a predicate that finds the Max value of a list of integers. I need to write one that compares from the beginning and...
Finding the max in a list - Prolog Finding the max in a list - Prolog prolog Finding Prolog max2 Finding the max in a list - Prolog I was just introduced to Prolog and am trying to write a predicate that finds the Max value of a list of integers. I need to write one that compares from the beginning and the other that c...
[ -0.0020599365234375, 0.00167083740234375, 0.0157470703125, 0.0108642578125, -0.0035400390625, 0.0390625, 0.0001964569091796875, 0.018310546875, 0.0169677734375, -0.0250244140625, 0.018798828125, -0.00982666015625, 0.0120849609375, -0.009765625, 0.03076171875, -0.0177001953125, 0.0043...
[ 26040, 70, 18389, 5303, 1250, 4867, 23, 502, 304, 31577, 33022, 1653, 2063, 67, 7413, 9920, 34292, 892, 26255, 3871, 69101, 86595, 3564, 2060, 92154, 627, 1556, 173969, 14373, 2886, 225490, 138, 10750, 28484 ]
[ 0.0819091796875, 0.0555419921875, 0.228759765625, 0.1885986328125, 0.1307373046875, 0.177490234375, 0.039459228515625, 0.044647216796875, 0.1182861328125, 0.03802490234375, 0.06231689453125, 0.0704345703125, 0.09393310546875, 0.03961181640625, 0.060791015625, 0.228515625, 0.135986328...
embed
39994779_c0
39994779
prolog
0
Title: Duplicate constraints in CLP(FD) and with dif/2 Problem title: Duplicate constraints in CLP(FD) and with dif/2 Tags: clpfd, prolog Problem: Duplicate constraints in CLP(FD) and with dif/2 In SWI-Prolog, the following query gives this result: ?- X mod 2 #= 0, X mod 2 #= 0. X mod 2#=0, X mod 2#=0. While correct, t...
Duplicate constraints in CLP(FD) and with dif/2 Duplicate constraints in CLP(FD) and with dif/2 clpfd prolog Duplicate CLP Duplicate constraints in CLP(FD) and with dif/2 In SWI-Prolog, the following query gives this result: While correct, there is obviously no need for the second constraint Similarly: Is there no way ...
[ -0.004180908203125, -0.00439453125, 0.001953125, 0.0203857421875, -0.00060272216796875, -0.00122833251953125, -0.007720947265625, -0.00579833984375, 0.01239013671875, -0.034912109375, -0.0308837890625, -0.0177001953125, 0.0146484375, 0.029296875, 0.005889892578125, 0.0113525390625, 0...
[ 786, 52721, 67, 158, 2816, 4288, 313, 37352, 98553, 136, 678, 45755, 12477, 33139, 39557, 71, 502, 4867, 159, 38969, 10752, 25632, 41, 1294, 26785, 171259, 110, 3871, 17932, 3917, 71864, 6044, 171763, 2684, 18151, 16648, 23468 ]
[ 0.1314697265625, 0.2496337890625, 0.0948486328125, 0.1048583984375, 0.2098388671875, 0.134765625, 0.04034423828125, 0.2276611328125, 0.1773681640625, 0.029205322265625, 0.045379638671875, 0.1856689453125, 0.212158203125, 0.0035400390625, 0.028472900390625, 0.080078125, 0.101623535156...
embed
40722648_c1
40722648
prolog
1
it from second A list and call recursive again, but with modified A list). When there are no more T elements, list A should contain only the same elements as list D and then with sub_third predicate find out, if all the elements are the same count. Sub_third works fine, so I think that mistake should be somewhere with...
it from second A list and call recursive again, but with modified A list). When there are no more T elements, list A should contain only the same elements as list D and then with sub_third predicate find out, if all the elements are the same count. Sub_third works fine, so I think that mistake should be somewhere with...
[ -0.019775390625, -0.01470947265625, 0.0166015625, 0.022705078125, -0.0087890625, 0.01507568359375, -0.0216064453125, 0.01190185546875, 0.0284423828125, 0.01190185546875, 0.015380859375, 0.00701904296875, 0.0179443359375, 0.023193359375, 0.0033111572265625, -0.0167236328125, 0.0181884...
[ 442, 1295, 17932, 62, 5303, 11782, 195625, 5844, 13438, 73197, 297, 110, 1286, 384, 80854, 5608, 70541, 4734, 5701, 391, 1614, 95037, 71, 1653, 2063, 7413, 1810, 2174, 756, 70, 621, 54529, 8273, 43240, 5885, 121742, 17914, 16031, 32786, 3...
[ 0.078857421875, 0.0579833984375, 0.101318359375, 0.09197998046875, 0.1790771484375, 0.123046875, 0.14208984375, 0.118408203125, 0.049407958984375, 0.12646484375, 0.009918212890625, 0.030792236328125, 0.080810546875, 0.10723876953125, 0.1697998046875, 0.0201873779296875, 0.05859375, ...
embed
20511060_c1
20511060
prolog
1
, -2, etc.) and all numbers are integers. A hint was given that the code will be structured similarly to the grammer <expression> ::= <expression> + <term> | <expression> - <term> | <term> <term> ::= <term> * <factor> | <term> / <factor> | <factor> <factor> ::= num | ( <expression> ) Only with negate implemented as wel...
, -2, etc.) and all numbers are integers. A hint was given that the code will be structured similarly to the grammer <expression> ::= <expression> + <term> | <expression> - <term> | <term> <term> ::= <term> * <factor> | <term> / <factor> | <factor> <factor> ::= num | ( <expression> ) Only with negate implemented as wel...
[ 0.02587890625, 0.0098876953125, 0.0089111328125, 0.02587890625, -0.0087890625, 0.01708984375, 0.01055908203125, 0.00909423828125, 0.0084228515625, -0.0311279296875, -0.004425048828125, -0.00003647804260253906, 0.00063323974609375, -0.0194091796875, -0.01531982421875, -0.002731323242187...
[ 122297, 16, 756, 101935, 621, 892, 26255, 5122, 18151, 1221, 45646, 71, 21373, 122092, 56, 204629, 997, 32166, 144810, 13269, 678, 90584, 13, 29479, 14037, 147, 366, 2189, 59121, 23, 1250, 4867, 275, 14137, 157, 112, 963, 2811, 40383, 284...
[ 0.19140625, 0.013885498046875, 0.07305908203125, 0.1448974609375, 0.054595947265625, 0.155517578125, 0.118896484375, 0.0841064453125, 0.2296142578125, 0.00433349609375, 0.12060546875, 0.022186279296875, 0.0767822265625, 0.1783447265625, 0.10888671875, 0.206787109375, 0.0511474609375,...
embed
66195403_c0
66195403
prolog
0
Title: Tabling in Prolog Game Search for Tic-Tac-Toe Problem title: Tabling in Prolog Game Search for Tic-Tac-Toe Tags: swi-prolog, tic-tac-toe, prolog-tabling, prolog Problem: Tabling in Prolog Game Search for Tic-Tac-Toe Many Prolog systems meanwhile implement tabling. SWI-Prolog has adopted much of XSB tabling. XSB ...
Tabling in Prolog Game Search for Tic-Tac-Toe Tabling in Prolog Game Search for Tic-Tac-Toe swi-prolog tic-tac-toe prolog-tabling prolog Tabling Prolog Game Search Tic-Tac-Toe Tabling in Prolog Game Search for Tic-Tac-Toe Many Prolog systems meanwhile implement tabling. SWI-Prolog has adopted much of XSB tabling. XSB t...
[ 0.0191650390625, 0.007415771484375, 0.0155029296875, -0.002838134765625, -0.0128173828125, -0.0023956298828125, 0.0224609375, 0.0040283203125, -0.0034637451171875, -0.033935546875, 0.0017852783203125, 0.0208740234375, -0.007293701171875, 0.0198974609375, -0.0089111328125, 0.00482177734...
[ 22193, 2069, 23, 1250, 4867, 13547, 33086, 100, 133552, 9, 618, 2263, 7763, 13, 91, 2452, 3454, 96212, 102, 238, 51890, 502, 79298, 52455, 76519, 204610, 29479, 308, 159, 38969, 10752, 1556, 30666, 5045, 1193, 36474, 42459, 96760, 6712, 3...
[ 0.26416015625, 0.1729736328125, 0.05462646484375, 0.1422119140625, 0.24267578125, 0.109375, 0.23388671875, 0.0703125, 0.1798095703125, 0.04156494140625, 0.14013671875, 0.18115234375, 0.1905517578125, 0.085693359375, 0.001922607421875, 0.1282958984375, 0.0909423828125, 0.16064453125...
embed
44354455_c0
44354455
prolog
0
Title: Get multiple solutions in SWI-Prolog using toplevel Problem title: Get multiple solutions in SWI-Prolog using toplevel Tags: prolog, prolog-toplevel Problem: Get multiple solutions in SWI-Prolog using toplevel I'm beginner in SWI-Prolog (but have some experience in Borland Prolog), and I've faced with a strange ...
Get multiple solutions in SWI-Prolog using toplevel Get multiple solutions in SWI-Prolog using toplevel prolog prolog-toplevel toplevel Get SWI-Prolog Get multiple solutions in SWI-Prolog using toplevel I'm beginner in SWI-Prolog (but have some experience in Borland Prolog), and I've faced with a strange behavior for t...
[ 0.008056640625, 0.0267333984375, 0.008544921875, 0.031982421875, -0.029541015625, -0.0150146484375, 0.00390625, 0.00927734375, -0.0030364990234375, -0.05419921875, 0.0086669921875, 0.0252685546875, -0.0177001953125, 0.026611328125, 0.0179443359375, -0.00133514404296875, 0.01214599609...
[ 20779, 48716, 51347, 159, 38969, 10752, 4867, 17368, 2663, 67919, 502, 13784, 9, 1679, 7422, 1760, 1250, 2577, 114453, 123166, 25632, 3034, 18151, 84751, 41, 1294, 705, 6954, 132, 284, 2046, 116, 62, 209, 74, 106, 33306, 4734, 2203, 18165...
[ 0.06610107421875, 0.2259521484375, 0.2227783203125, 0.036895751953125, 0.225341796875, 0.13427734375, 0.179931640625, 0.01495361328125, 0.1068115234375, 0.2076416015625, 0.1041259765625, 0.082275390625, 0.01434326171875, 0.0145111083984375, 0.036865234375, 0.1119384765625, 0.07324218...
embed
23555031_c0
23555031
prolog
0
Title: How to load prolog files with rules on Mac OSX Problem title: How to load prolog files with rules on Mac OSX Tags: prolog, macos, swi-prolog Problem: How to load prolog files with rules on Mac OSX I'm using SWI-Prolog and I have a .pl file but cannot load it correctly. Not sure if I'm looking in the right places...
How to load prolog files with rules on Mac OSX How to load prolog files with rules on Mac OSX prolog macos swi-prolog How Mac OSX Undefined Procedure How to load prolog files with rules on Mac OSX I'm using SWI-Prolog and I have a .pl file but cannot load it correctly. Not sure if I'm looking in the right places but ca...
[ 0.031982421875, 0.0206298828125, -0.007659912109375, 0.0303955078125, -0.0224609375, 0.01318359375, 0.01348876953125, 0.001739501953125, 0.006927490234375, -0.053955078125, -0.008056640625, -0.01708984375, -0.01348876953125, -0.0172119140625, 0.02587890625, -0.0021820068359375, 0.004...
[ 11249, 47, 72367, 502, 4867, 102158, 678, 91736, 98, 4727, 11787, 1542, 7840, 91, 2452, 3454, 79912, 5983, 297, 170470, 159, 38969, 10752, 5, 2424, 11435, 53418, 26785, 51042, 7108, 18158, 9803, 1250, 4488, 14192, 1062, 1067, 4068, 151309, ...
[ 0.040313720703125, 0.009674072265625, 0.1854248046875, 0.2093505859375, 0.259033203125, 0.1688232421875, 0.1392822265625, 0.1947021484375, 0.0535888671875, 0.114990234375, 0.1326904296875, 0.1212158203125, 0.06219482421875, 0.01348876953125, 0.1707763671875, 0.163818359375, 0.0841674...
embed
64090764_c0
64090764
prolog
0
Title: Is there a way to use ! operator in prolog using predicates only in prolog? Problem title: Is there a way to use ! operator in prolog using predicates only in prolog? Tags: prolog Problem: Is there a way to use ! operator in prolog using predicates only in prolog? isa(X,Y) :- X=Y. isa(X,Y) :- isaLink(X,Y). isa(X...
Is there a way to use ! operator in prolog using predicates only in prolog? Is there a way to use ! operator in prolog using predicates only in prolog? prolog predicates Is there a way to use ! operator in prolog using predicates only in prolog? I am trying to get the least common ancestor(mostSpecificSubsumer), althou...
[ 0.00555419921875, 0.0107421875, 0.0216064453125, 0.004486083984375, -0.01220703125, 0.009033203125, 0.000812530517578125, 0.0179443359375, 0.0026397705078125, -0.04052734375, 0.0078125, -0.01019287109375, 0.00022125244140625, -0.00921630859375, 0.009033203125, 0.005828857421875, -0.0...
[ 2685, 3917, 4527, 711, 39933, 23, 502, 4867, 17368, 1653, 2063, 1636, 4734, 10, 47, 2071, 31577, 2046, 19713, 39210, 60502, 1290, 840, 18, 47107, 14486, 96472, 11832, 56, 95486, 959, 107003, 59226, 15190, 3060, 91736, 91995, 442 ]
[ 0.0269927978515625, 0.1214599609375, 0.1663818359375, 0.1966552734375, 0.297119140625, 0.083984375, 0.1959228515625, 0.2685546875, 0.0745849609375, 0.2032470703125, 0.22509765625, 0.1390380859375, 0.114013671875, 0.035400390625, 0.0098876953125, 0.004425048828125, 0.030517578125, 0...
embed
47247515_c0
47247515
prolog
0
Title: How to return the result of a list in Prolog? Problem title: How to return the result of a list in Prolog? Tags: list, member, prolog Problem: How to return the result of a list in Prolog? I have a list of items, which is in a method. I'm using another method to call out the list but I do not want to input the l...
How to return the result of a list in Prolog? How to return the result of a list in Prolog? list member prolog How Prolog How to return the result of a list in Prolog? I have a list of items, which is in a method. I'm using another method to call out the list but I do not want to input the list inside that method. How ...
[ 0.00897216796875, 0.000347137451171875, 0.007720947265625, 0.00174713134765625, 0.001434326171875, 0.00823974609375, 0.011474609375, 0.002685546875, 0.006500244140625, -0.0257568359375, 0.00799560546875, -0.0216064453125, -0.0185546875, 0.0216064453125, 0.004730224609375, -0.0111694335...
[ 11249, 47, 30646, 70, 16750, 111, 5303, 23, 1250, 4867, 32786, 502, 55769, 55300, 11782, 1810, 959, 3444, 107730, 46132, 86869, 15549, 738, 1542, 5775, 31, 4488, 13, 472 ]
[ 0.077880859375, 0.056396484375, 0.2222900390625, 0.042877197265625, 0.182861328125, 0.0706787109375, 0.2244873046875, 0.07415771484375, 0.1629638671875, 0.2607421875, 0.129150390625, 0.09820556640625, 0.1180419921875, 0.1031494140625, 0.04583740234375, 0.06829833984375, 0.06909179687...
embed
5760883_c0
5760883
prolog
0
Title: moving through a list Problem title: moving through a list Tags: prolog Problem: moving through a list Learning this very slowly... got some books today and they just plain suck.. so.. I'm trying to move X position through a list.. then return the remainder of the list. Problem being I'm returning merely the ele...
moving through a list moving through a list prolog K-1 moving through a list Learning this very slowly... got some books today and they just plain suck.. so.. I'm trying to move X position through a list.. then return the remainder of the list. Problem being I'm returning merely the element at that position rather than...
[ 0.01214599609375, 0.0108642578125, 0.00421142578125, -0.006072998046875, -0.007232666015625, 0.015869140625, 0.0029449462890625, 0.01611328125, 0.0203857421875, 0.00037384033203125, 0.01336669921875, 0.0007781982421875, -0.0181884765625, -0.00518798828125, 0.00787353515625, -0.00096130...
[ 98567, 8305, 5303, 10, 502, 4867, 341, 5759, 114344, 4552, 191975, 42840, 166, 2594, 31577, 25813, 1193, 19069, 30646, 47143, 820, 15649, 214, 12830, 99, 2967, 3647, 7225, 69723, 77336, 3555, 9077, 454, 58, 11814, 187136, 98893, 129745 ]
[ 0.1409912109375, 0.2061767578125, 0.235107421875, 0.052154541015625, 0.1240234375, 0.1739501953125, 0.0826416015625, 0.1419677734375, 0.05938720703125, 0.00054931640625, 0.090087890625, 0.079345703125, 0.016204833984375, 0.026214599609375, 0.061767578125, 0.156494140625, 0.0608520507...
embed
60176929_c1
60176929
prolog
1
scale(mile, 8, furlong). scale(league, 3, mile). I am trying to run the following tests cases to test my "convert" predicate but on the third test it gets stuck on an infinite loop. test(convert) :- convert(foot, 2, inch, 24.0). test(convert) :- convert(foot, 6, yard, 2.0). test(convert) :- convert(chain, 2, foot, 132...
scale(mile, 8, furlong). scale(league, 3, mile). I am trying to run the following tests cases to test my "convert" predicate but on the third test it gets stuck on an infinite loop. test(convert) :- convert(foot, 2, inch, 24.0). test(convert) :- convert(foot, 6, yard, 2.0). test(convert) :- convert(chain, 2, foot, 132...
[ 0.00921630859375, -0.01190185546875, -0.001312255859375, -0.004608154296875, -0.03173828125, -0.012939453125, -0.0238037109375, 0.005859375, 0.0302734375, 0.01409912109375, 0.005859375, 0.0115966796875, -0.01177978515625, -0.0034027099609375, 0.0201416015625, 0.007293701171875, -0.00...
[ 105994, 45207, 382, 16387, 10617, 14507, 6261, 138, 84765, 31577, 11675, 70, 25632, 109921, 50218, 3034, 2271, 11549, 1653, 2063, 67, 1284, 50960, 442, 62163, 179933, 98, 54241, 13, 40956, 96760, 144593, 4, 116, 23, 11585, 77495, 305, 14391...
[ 0.289794921875, 0.1749267578125, 0.13671875, 0.0814208984375, 0.19775390625, 0.061279296875, 0.0751953125, 0.064453125, 0.1715087890625, 0.06011962890625, 0.10528564453125, 0.0176544189453125, 0.03265380859375, 0.2027587890625, 0.0919189453125, 0.221923828125, 0.08416748046875, 0.2...
embed
16258170_c0
16258170
prolog
0
Title: Prolog, Returning list from 1 to N Problem title: Prolog, Returning list from 1 to N Tags: prolog Problem: Prolog, Returning list from 1 to N Basically I'm working on a bigger problem, but how would I return a list from 1 to a number n ? I'm new to this and a little confused. Also, would it be possible to pass t...
Prolog, Returning list from 1 to N Prolog, Returning list from 1 to N prolog 1 Prolog Returning Prolog, Returning list from 1 to N Basically I'm working on a bigger problem, but how would I return a list from 1 to a number n ? I'm new to this and a little confused. Also, would it be possible to pass this as a parameter...
[ 0.001678466796875, -0.005859375, -0.01336669921875, -0.00174713134765625, -0.0108642578125, 0.0289306640625, 0.007080078125, 0.01007080078125, 0.01092529296875, -0.033447265625, 0.00933837890625, -0.0255126953125, -0.01019287109375, -0.0028839111328125, -0.006256103515625, -0.002044677...
[ 1250, 4867, 173340, 214, 5303, 1295, 106, 47, 541, 502, 20697, 167785, 2967, 3642, 2806, 87, 30646, 10, 14012, 653, 3525, 10176, 55681, 7722, 27875, 903, 171859, 32354, 11782, 12765, 54936, 6562, 41600, 866, 141, 17721, 136, 90502, 18614, ...
[ 0.204833984375, 0.2724609375, 0.2230224609375, 0.055419921875, 0.246337890625, 0.1534423828125, 0.173583984375, 0.163818359375, 0.185546875, 0.169189453125, 0.0621337890625, 0.0272369384765625, 0.1103515625, 0.0977783203125, 0.0797119140625, 0.0173187255859375, 0.25146484375, 0.027...
embed
74841293_c1
74841293
prolog
1
graphical debugger when tracing through the steps. But when returning and entering the append(NewDeck,[],CurrentDeck) line, the override does not occur, instead it returns back into the next loop of getcard and proceeds to override the current Hand the user has. The debugger also doesn't throw up an error to point me ...
graphical debugger when tracing through the steps. But when returning and entering the append(NewDeck,[],CurrentDeck) line, the override does not occur, instead it returns back into the next loop of getcard and proceeds to override the current Hand the user has. The debugger also doesn't throw up an error to point me ...
[ 0.0038909912109375, -0.00848388671875, 0.0262451171875, 0.0201416015625, 0.017333984375, 0.00689697265625, 0.0101318359375, 0.003875732421875, 0.0191650390625, 0.00048828125, -0.000568389892578125, 0.0146484375, -0.00396728515625, -0.0107421875, 0.007415771484375, -0.01165771484375, ...
[ 48461, 289, 8, 978, 21407, 3229, 1152, 21896, 8305, 98441, 4966, 30646, 22, 33558, 114689, 71, 46568, 120152, 92, 474, 15724, 13315, 645, 416, 112, 14602, 959, 74918, 64457, 4420, 3934, 11737, 40956, 2046, 38931, 172337, 43581, 10639, 38937...
[ 0.1690673828125, 0.042938232421875, 0.156494140625, 0.2176513671875, 0.18603515625, 0.044036865234375, 0.148193359375, 0.0794677734375, 0.06903076171875, 0.183349609375, 0.053466796875, 0.162841796875, 0.06390380859375, 0.0941162109375, 0.1915283203125, 0.189453125, 0.08990478515625,...
embed
67562651_c0
67562651
prolog
0
Title: How to define a Regex/Regular Expression and implementing it through Prolog as automata? Problem title: How to define a Regex/Regular Expression and implementing it through Prolog as automata? Tags: automata, regex, prolog Problem: How to define a Regex/Regular Expression and implementing it through Prolog as au...
How to define a Regex/Regular Expression and implementing it through Prolog as automata? How to define a Regex/Regular Expression and implementing it through Prolog as automata? automata regex prolog How Regex Regular Expression Prolog How to define a Regex/Regular Expression and implementing it through Prolog as autom...
[ 0.0130615234375, -0.00084686279296875, 0.002655029296875, 0.03662109375, 0.0113525390625, 0.0126953125, -0.00762939453125, 0.0118408203125, 0.0013427734375, -0.00958251953125, 0.000759124755859375, 0.01068115234375, -0.0118408203125, 0.00286865234375, 0.029296875, 0.0186767578125, 0....
[ 11249, 47, 61924, 11678, 3355, 64, 54601, 35975, 25129, 1830, 29479, 8305, 1250, 4867, 237, 11408, 11, 6835, 502, 47881, 42, 10, 66211, 20324, 125195, 9069, 27489, 25632, 46876, 4734, 339, 11766, 1369, 2389, 534, 963, 209, 4331, 26946, 57...
[ 0.080322265625, 0.019683837890625, 0.2242431640625, 0.1795654296875, 0.23291015625, 0.03717041015625, 0.1702880859375, 0.185791015625, 0.201171875, 0.119140625, 0.14599609375, 0.06671142578125, 0.1611328125, 0.2403564453125, 0.06011962890625, 0.22314453125, 0.1387939453125, 0.13977...
embed
38064479_c1
38064479
prolog
1
(X,X),f(a(U,g(T)),a(g(Z),U))). X = a(g(Z), U), dif(f(U, T), f(g(Z), Z)). Any ideas how to proceed? Disclaimer, its a trap: I don't endorse commutativity testing as a good testing method, where you can separate good and bad predicates versus a specification. Since usually both the good and bad predicates might have no p...
(X,X),f(a(U,g(T)),a(g(Z),U))). X = a(g(Z), U), dif(f(U, T), f(g(Z), Z)). Any ideas how to proceed? Disclaimer, its a trap: I don't endorse commutativity testing as a good testing method, where you can separate good and bad predicates versus a specification. Since usually both the good and bad predicates might have no p...
[ -0.00726318359375, 0.008056640625, 0.0037384033203125, 0.0294189453125, -0.010986328125, -0.0126953125, 0.00433349609375, -0.006591796875, 0.00384521484375, -0.017578125, -0.00775146484375, 0.019287109375, 0.01116943359375, 0.01556396484375, -0.01007080078125, 0.00592041015625, 0.006...
[ 1542, 4, 420, 11, 1062, 177, 618, 1511, 32149, 1193, 2203, 10, 345, 45755, 384, 1238, 567, 25647, 172337, 184980, 6863, 63819, 1846, 375, 68754, 54613, 53, 134234, 4127, 55300, 84797, 136, 6494, 1653, 2063, 119475, 29458, 44402, 17368, 23...
[ 0.140380859375, 0.020111083984375, 0.1148681640625, 0.05157470703125, 0.1236572265625, 0.06915283203125, 0.06488037109375, 0.13134765625, 0.00640869140625, 0.1966552734375, 0.118896484375, 0.0780029296875, 0.1474609375, 0.2431640625, 0.108154296875, 0.101806640625, 0.108642578125, ...
embed
5816801_c1
5816801
prolog
1
fact and start it from there? I need to understand how it backtracks when rules are being used in prolog specifically in recursive situations like this one. 3) I found the following code(recursive) on the net. It divides a list into positive and negative lists. % predicates split(list,list,list) split([X|L],L1,[X|L2])...
fact and start it from there? I need to understand how it backtracks when rules are being used in prolog specifically in recursive situations like this one. 3) I found the following code(recursive) on the net. It divides a list into positive and negative lists. % predicates split(list,list,list) split([X|L],L1,[X|L2])...
[ 0.00579833984375, 0.0267333984375, -0.007293701171875, 0.01513671875, -0.0230712890625, 0.031494140625, 0.0155029296875, 0.0054931640625, 0.004241943359375, 0.0001850128173828125, 0.001190185546875, -0.0223388671875, -0.009521484375, 0.00750732421875, 0.0036163330078125, -0.00153350830...
[ 15824, 4034, 1295, 2685, 3871, 28219, 3642, 4420, 125728, 7, 91736, 11814, 502, 4867, 195625, 5844, 113949, 8439, 14037, 25632, 18151, 107, 48650, 101637, 5303, 3934, 24491, 136, 40907, 1745, 1653, 2063, 1636, 65450, 6562, 1542, 866, 418, 9...
[ 0.2149658203125, 0.061859130859375, 0.02423095703125, 0.008453369140625, 0.0154571533203125, 0.116943359375, 0.0168914794921875, 0.1292724609375, 0.2249755859375, 0.0203704833984375, 0.199462890625, 0.0654296875, 0.1588134765625, 0.2509765625, 0.2283935546875, 0.182373046875, 0.09741...
embed
24107673_c0
24107673
prolog
0
Title: Returning a true value instead of integer value in prolog Problem title: Returning a true value instead of integer value in prolog Tags: prolog Problem: Returning a true value instead of integer value in prolog I have a simple function below which takes 2 lists ( with the same size) and a variable which stores s...
Returning a true value instead of integer value in prolog Returning a true value instead of integer value in prolog prolog Returning Returning a true value instead of integer value in prolog I have a simple function below which takes 2 lists ( with the same size) and a variable which stores some result. My intention wa...
[ -0.001068115234375, -0.003692626953125, -0.004058837890625, 0.002166748046875, -0.000682830810546875, -0.005889892578125, 0.00592041015625, 0.0078125, 0.0115966796875, -0.01513671875, 0.010498046875, 0.0146484375, -0.021240234375, 0.0133056640625, 0.0213623046875, -0.0186767578125, 0...
[ 173340, 214, 29568, 34292, 64457, 111, 892, 1505, 502, 4867, 23, 8781, 32354, 35064, 51776, 116, 5303, 5701, 13267, 77336, 4343, 16750, 91177, 69101, 10336, 678, 51312, 30646, 2046, 248, 98320 ]
[ 0.2022705078125, 0.046234130859375, 0.215087890625, 0.2061767578125, 0.1585693359375, 0.064208984375, 0.1146240234375, 0.0975341796875, 0.1588134765625, 0.246337890625, 0.0250244140625, 0.08892822265625, 0.14111328125, 0.09893798828125, 0.010711669921875, 0.04388427734375, 0.14892578...
embed
1243748_c0
1243748
prolog
0
Title: How to do case conversion in Prolog? Problem title: How to do case conversion in Prolog? Tags: prolog, wordnet Problem: How to do case conversion in Prolog? I'm interfacing with WordNet , and some of the terms I'd like to classify (various proper names) are capitalised in the database, but the input I get may no...
How to do case conversion in Prolog? How to do case conversion in Prolog? prolog wordnet How Prolog How to do case conversion in Prolog? I'm interfacing with WordNet , and some of the terms I'd like to classify (various proper names) are capitalised in the database, but the input I get may not be capitalised properly. ...
[ 0.0067138671875, -0.00018978118896484375, -0.007232666015625, -0.0084228515625, -0.0035858154296875, 0.00750732421875, 0.015625, 0.00927734375, 0.006805419921875, 0.0003147125244140625, 0.003631591796875, -0.010009765625, -0.01226806640625, -0.006805419921875, 0.010498046875, -0.005187...
[ 11249, 47, 54, 7225, 142477, 23, 1250, 4867, 502, 2565, 1179, 91468, 22543, 24447, 69407, 1884, 18507, 40383, 27798, 123055, 10323, 52021, 63399, 107730, 155965, 61475, 6528, 33022, 1653, 2063, 67, 27489, 67842, 15032, 7722, 9077, 11522, 9376...
[ 0.091064453125, 0.04486083984375, 0.076904296875, 0.248046875, 0.218505859375, 0.07855224609375, 0.17138671875, 0.259765625, 0.1029052734375, 0.041015625, 0.1348876953125, 0.04217529296875, 0.08160400390625, 0.1724853515625, 0.1094970703125, 0.0182647705078125, 0.1134033203125, 0.1...
embed
19619476_c0
19619476
prolog
0
Title: Finding the oldest person in Prolog Problem title: Finding the oldest person in Prolog Tags: prolog Problem: Finding the oldest person in Prolog Based on some facts, I have to find the oldest person using Prolog. For example: age(john, 10). age(mary, 15). age(rose, 75). age(jack, 49). age(carl, 17). age(lucy, 66...
Finding the oldest person in Prolog Finding the oldest person in Prolog prolog Finding Prolog Finding the oldest person in Prolog Based on some facts, I have to find the oldest person using Prolog. For example: Console output should be: My code is as follows, but it's not working: I can't find the error, but I guess it...
[ 0.01312255859375, 0.0245361328125, 0.0177001953125, 0.018798828125, -0.01336669921875, 0.0235595703125, 0.006134033203125, 0.006988525390625, -0.005706787109375, -0.058837890625, -0.000484466552734375, -0.013916015625, -0.0062255859375, -0.003265380859375, 0.00982666015625, -0.00756835...
[ 26040, 70, 10332, 525, 3445, 23, 1250, 4867, 502, 214, 15824, 7413, 17368, 1657, 40777, 140992, 5608, 186, 18151, 28960, 959, 20697, 831, 18499, 57767, 62548, 4420, 125728, 4358, 22936, 3525, 47 ]
[ 0.1219482421875, 0.0972900390625, 0.234130859375, 0.2225341796875, 0.1751708984375, 0.05657958984375, 0.18701171875, 0.2529296875, 0.1231689453125, 0.0052490234375, 0.012054443359375, 0.13671875, 0.0966796875, 0.0286712646484375, 0.145751953125, 0.164306640625, 0.028411865234375, 0...
embed
22133996_c0
22133996
prolog
0
Title: prolog: how to tell with global_cardinality that a list has at least N element that equals M (M,N are integer) Problem title: prolog: how to tell with global_cardinality that a list has at least N element that equals M (M,N are integer) Tags: constraint-programming, sicstus-prolog, prolog, clpfd Problem: prolog:...
prolog: how to tell with global_cardinality that a list has at least N element that equals M (M,N are integer) prolog: how to tell with global_cardinality that a list has at least N element that equals M (M,N are integer) constraint-programming sicstus-prolog prolog clpfd global_cardinality prolog: how to tell with glo...
[ -0.0181884765625, -0.01043701171875, 0.000659942626953125, -0.005126953125, 0.00048828125, 0.008544921875, -0.0035552978515625, 0.012451171875, 0.007568359375, -0.001129150390625, 0.0146484375, -0.03125, 0.0238037109375, 0.00299072265625, 0.0030059814453125, 0.006072998046875, -0.004...
[ 502, 4867, 3642, 14192, 678, 7964, 38931, 73, 134393, 450, 5303, 1556, 19713, 541, 12830, 105950, 276, 594, 839, 892, 1505, 4, 158, 2816, 4288, 28966, 18253, 3454, 39557, 71, 77336, 62, 397, 35431, 23, 284, 571, 441, 2685, 8110, 186351,...
[ 0.1490478515625, 0.2020263671875, 0.0191497802734375, 0.16943359375, 0.0399169921875, 0.1588134765625, 0.1099853515625, 0.120361328125, 0.1363525390625, 0.00201416015625, 0.2269287109375, 0.06915283203125, 0.169921875, 0.1763916015625, 0.2261962890625, 0.1700439453125, 0.13916015625,...
embed
8174561_c0
8174561
prolog
0
Title: Generating string of symbols(sentence) for a given context free grammar Problem title: Generating string of symbols(sentence) for a given context free grammar Tags: prolog, context-free-grammar, dcg Problem: Generating string of symbols(sentence) for a given context free grammar I have a simple grammar such as S...
Generating string of symbols(sentence) for a given context free grammar Generating string of symbols(sentence) for a given context free grammar prolog context-free-grammar dcg Generating Generating string of symbols(sentence) for a given context free grammar I have a simple grammar such as Now i want to write a parser ...
[ 0.0208740234375, 0.005523681640625, -0.0213623046875, 0.01068115234375, -0.0201416015625, -0.007598876953125, -0.007171630859375, 0.007720947265625, 0.009033203125, -0.0250244140625, -0.0189208984375, -0.0220947265625, -0.01129150390625, 0.0023345947265625, 0.005157470703125, 0.0062255...
[ 155370, 1916, 79315, 26582, 7, 12832, 6620, 100, 34475, 43701, 4092, 122092, 147, 111, 502, 4867, 32087, 107415, 104, 238, 177, 8781, 3444, 33022, 366, 2189, 36917, 139392, 149357, 10, 76596, 5125, 390, 25737, 2684, 30057, 959, 4127, 34831,...
[ 0.1790771484375, 0.064453125, 0.1734619140625, 0.2169189453125, 0.062347412109375, 0.098876953125, 0.070556640625, 0.04217529296875, 0.05810546875, 0.15087890625, 0.1383056640625, 0.1090087890625, 0.08154296875, 0.0323486328125, 0.0921630859375, 0.1768798828125, 0.0888671875, 0.061...
embed
23422038_c0
23422038
prolog
0
Title: Prolog Loops until True Problem title: Prolog Loops until True Tags: primes, prolog Problem: Prolog Loops until True I'm pretty new to Prolog but I'm trying to get this program to give me the first set of twin primes that appears either at or above N. twins(M) :- M2 is M + 2, twin_prime(M, M2), write(M), write('...
Prolog Loops until True Prolog Loops until True primes prolog Prolog Loops twin_prime Prolog Loops until True I'm pretty new to Prolog but I'm trying to get this program to give me the first set of twin primes that appears either at or above N. However, I'm not completely sure how to go about getting it to loop and rep...
[ 0.0272216796875, 0.005157470703125, 0.0196533203125, 0.0181884765625, 0.0013885498046875, 0.01202392578125, 0.025634765625, 0.002899169921875, 0.023681640625, -0.0693359375, 0.0184326171875, 0.01324462890625, -0.015625, -0.001678466796875, 0.015625, 0.0299072265625, 0.00909423828125,...
[ 1250, 4867, 199694, 7, 24189, 87599, 20809, 502, 138241, 114654, 28875, 3525, 31577, 2046, 1528, 8337, 5117, 5423, 135179, 99, 36917, 541, 64557, 9077, 3642, 1672, 20949, 47, 40956, 136, 119140, 29568, 37842, 17368, 107838, 1653, 2063, 67, ...
[ 0.1832275390625, 0.2493896484375, 0.2265625, 0.06787109375, 0.187255859375, 0.2357177734375, 0.2176513671875, 0.1265869140625, 0.229736328125, 0.207275390625, 0.0153656005859375, 0.04461669921875, 0.03411865234375, 0.011749267578125, 0.1314697265625, 0.044586181640625, 0.08984375, ...
embed
11142486_c0
11142486
prolog
0
Title: Prolog: user input and multiple outputs Problem title: Prolog: user input and multiple outputs Tags: user-input, prolog Problem: Prolog: user input and multiple outputs student(foo). student(bar). KB ask(Q) :- ask(Q,A). ask(Q,A) :- ..... ask(Q,A) takes a question in a form of linked list generated by getsentence...
Prolog: user input and multiple outputs Prolog: user input and multiple outputs user-input prolog Prolog statement:who Prolog: user input and multiple outputs KB ask(Q,A) takes a question in a form of linked list generated by getsentence(S). Only one result shows up instead of multiple as an output. I feel like I am mi...
[ 0.0123291015625, -0.000606536865234375, -0.000415802001953125, 0.0084228515625, -0.013671875, 0.0003795623779296875, 0.008544921875, 0.0125732421875, 0.00408935546875, -0.05126953125, 0.0150146484375, 0.01263427734375, -0.006591796875, 0.00897216796875, -0.01068115234375, -0.0039367675...
[ 1250, 4867, 38937, 107730, 136, 48716, 140992, 73, 7077, 502, 63805, 497, 30742, 26458, 2737, 284, 51776, 9655, 3173, 3126, 5303, 139392, 2046, 12832, 6620, 294, 87293, 1632, 16750, 45831, 1257, 64457, 237, 12319, 1884, 132283, 9844, 8781, ...
[ 0.191650390625, 0.261474609375, 0.182373046875, 0.2215576171875, 0.0709228515625, 0.221923828125, 0.2462158203125, 0.1043701171875, 0.038604736328125, 0.133056640625, 0.1265869140625, 0.1124267578125, 0.17578125, 0.1942138671875, 0.12255859375, 0.113037109375, 0.00457763671875, 0.1...
embed
51609151_c0
51609151
prolog
0
Title: The Eight-Digit puzzle in prolog Problem title: The Eight-Digit puzzle in prolog Tags: clpfd, prolog Problem: The Eight-Digit puzzle in prolog I'm trying to figure how to approach the following puzzle in prolog. I need to create a predicate eight_digit_puzzle(Result). that suggests all possible solutions for the...
The Eight-Digit puzzle in prolog The Eight-Digit puzzle in prolog clpfd prolog Eight-Digit The Eight-Digit puzzle in prolog I'm trying to figure how to approach the following puzzle in prolog. I need to create a predicate eight_digit_puzzle(Result). that suggests all possible solutions for the eight-digit puzzle which ...
[ 0.0026092529296875, -0.004669189453125, -0.005584716796875, 0.01373291015625, -0.027099609375, 0.024658203125, -0.0205078125, 0.004150390625, -0.00982666015625, 0.00154876708984375, -0.019775390625, 0.006378173828125, 0.000499725341796875, 0.0140380859375, -0.017578125, 0.0087280273437...
[ 581, 241, 22553, 9, 14055, 15769, 104192, 23, 502, 4867, 33139, 39557, 71, 31577, 26366, 51515, 25632, 3871, 28282, 1653, 2063, 67, 136659, 4803, 217, 1766, 13894, 133, 4332, 7, 7136, 42459, 756, 7722, 51347, 28960, 6097, 91736, 98423, 38...
[ 0.0767822265625, 0.1492919921875, 0.26220703125, 0.0576171875, 0.12060546875, 0.1561279296875, 0.2227783203125, 0.06689453125, 0.1611328125, 0.2044677734375, 0.0170440673828125, 0.0283050537109375, 0.0460205078125, 0.0001220703125, 0.049072265625, 0.0904541015625, 0.05462646484375, ...
embed
68999599_c0
68999599
prolog
0
Title: Prolog - Unification of complex terms Problem title: Prolog - Unification of complex terms Tags: unification, prolog Problem: Prolog - Unification of complex terms I am currently studying for an AI exam and my final thing to revise is Prolog. Below you can see the question I have to solve: If possible, unify unc...
Prolog - Unification of complex terms Prolog - Unification of complex terms unification prolog Prolog Unification Prolog - Unification of complex terms I am currently studying for an AI exam and my final thing to revise is Prolog. Below you can see the question I have to solve: If possible, unify uncle(brother(W), Q) w...
[ 0.024169921875, 0.017822265625, 0.007232666015625, 0.0164794921875, 0.00007343292236328125, -0.00543212890625, -0.00830078125, -0.01092529296875, 0.003021240234375, -0.01239013671875, -0.00323486328125, 0.01177978515625, 0.0228271484375, 0.0037078857421875, -0.01416015625, 0.0071105957...
[ 1250, 4867, 992, 41274, 27140, 69407, 51, 502, 82424, 35187, 214, 100, 38730, 42276, 2704, 13580, 15226, 184, 17336, 1957, 9655, 765, 86869, 4263, 7722, 40383, 11030, 6369, 9319, 1456, 2396, 678, 66159, 42732, 294, 444, 64557, 72856, 11192,...
[ 0.1678466796875, 0.264404296875, 0.1815185546875, 0.148681640625, 0.207763671875, 0.22509765625, 0.178466796875, 0.1072998046875, 0.03546142578125, 0.05438232421875, 0.032379150390625, 0.0220794677734375, 0.1624755859375, 0.130859375, 0.081787109375, 0.049072265625, 0.07080078125, ...
embed
50822878_c0
50822878
prolog
0
Title: Prolog get squares of NxN matrix Problem title: Prolog get squares of NxN matrix Tags: list, matrix, prolog Problem: Prolog get squares of NxN matrix I have a list L = [[5,6,7,8],[10,11,12,13],[1,2,3,4],[14,15,16,17]] Ii. That represents my matrix. The size can change dynamic, so the blocksize can be different, ...
Prolog get squares of NxN matrix Prolog get squares of NxN matrix list matrix prolog Prolog NxN Prolog get squares of NxN matrix I have a list L = [[5,6,7,8],[10,11,12,13],[1,2,3,4],[14,15,16,17]] Ii. That represents my matrix. The size can change dynamic, so the blocksize can be different, 4x4 = 4 elements, 9x9= 9 ele...
[ 0.0002899169921875, 0.0086669921875, 0.024658203125, -0.01904296875, -0.002899169921875, 0.0034942626953125, -0.004486083984375, 0.0181884765625, 0.016357421875, 0.00048065185546875, 0.00506591796875, 0.0086669921875, -0.0037689208984375, -0.029296875, -0.0264892578125, 0.0120849609375...
[ 1250, 4867, 2046, 108047, 7, 111, 541, 425, 839, 50944, 5303, 502, 87, 765, 339, 2203, 104629, 136005, 963, 1662, 1530, 2681, 133063, 82449, 2592, 1837, 2485, 2489, 14, 33636, 759, 13267, 15549, 84079, 46389, 62539, 12921, 201, 617, 80854...
[ 0.1529541015625, 0.2509765625, 0.09967041015625, 0.22900390625, 0.076904296875, 0.0894775390625, 0.0823974609375, 0.141357421875, 0.171142578125, 0.1826171875, 0.1820068359375, 0.1138916015625, 0.03033447265625, 0.0201568603515625, 0.1021728515625, 0.0123291015625, 0.14306640625, 0...
embed
55194174_c0
55194174
prolog
0
Title: Prolog (arguments not instantiated) Problem title: Prolog (arguments not instantiated) Tags: prolog, list Problem: Prolog (arguments not instantiated) I am writing a predicate that separates consecutive elements(all negative or positive) into different groups like same([1,2,3,-1,-3,-2,4,5,6],X). would output [[1...
Prolog (arguments not instantiated) Prolog (arguments not instantiated) prolog list Prolog Tail Error message:ERROR Arguments _4652 sign_runs _4696 _4702 Users filepath:40 Prolog (arguments not instantiated) I am writing a predicate that separates consecutive elements(all negative or positive) into different groups lik...
[ 0.024658203125, 0.01324462890625, -0.007476806640625, -0.01165771484375, -0.0206298828125, 0.03515625, -0.000946044921875, 0.00445556640625, 0.0279541015625, 0.00421142578125, 0.0216064453125, 0.00167083740234375, -0.0018768310546875, -0.0076904296875, -0.01336669921875, 0.007690429687...
[ 1250, 4867, 155937, 959, 34648, 14, 27686, 502, 5303, 1218, 379, 212059, 26008, 12501, 14255, 1052, 112140, 153109, 304, 24092, 16428, 9271, 11648, 162110, 53400, 11435, 128405, 22932, 32562, 1653, 2063, 67, 84797, 148390, 80854, 5584, 40907, ...
[ 0.17919921875, 0.2412109375, 0.20751953125, 0.115478515625, 0.09149169921875, 0.06768798828125, 0.0175323486328125, 0.1278076171875, 0.110107421875, 0.121826171875, 0.115234375, 0.1282958984375, 0.020843505859375, 0.07830810546875, 0.127685546875, 0.0186004638671875, 0.259765625, 0...
embed
36767737_c0
36767737
prolog
0
Title: Separating numbers from a Prolog Variable Problem title: Separating numbers from a Prolog Variable Tags: variables, prolog Problem: Separating numbers from a Prolog Variable If I were to initialize something like this on the terminal: numbers((2,5)). How can I obtain the two values individually. I have this on m...
Separating numbers from a Prolog Variable Separating numbers from a Prolog Variable variables prolog a Separating Prolog Variable Pair_numbers nth1 Random_list List_Row Value Separating numbers from a Prolog Variable If I were to initialize something like this on the terminal: How can I obtain the two values individual...
[ 0.009521484375, -0.004547119140625, -0.007415771484375, 0.0137939453125, 0.00592041015625, 0.03515625, -0.005157470703125, -0.0023040771484375, 0.00537109375, -0.0201416015625, 0.004852294921875, -0.0133056640625, -0.01055908203125, -0.00099945068359375, 0.0034942626953125, -0.01544189...
[ 503, 6276, 1916, 101935, 1295, 1250, 4867, 84572, 2886, 77336, 502, 1342, 2606, 1297, 927, 418, 39643, 306, 6562, 32036, 12724, 434, 190060, 61475, 20650, 1884, 903, 70, 33949, 11249, 831, 113054, 6626, 142424, 11651, 98, 18151, 22027, 18, ...
[ 0.0634765625, 0.2049560546875, 0.035308837890625, 0.1983642578125, 0.090087890625, 0.14697265625, 0.2271728515625, 0.1241455078125, 0.0814208984375, 0.16845703125, 0.09539794921875, 0.0941162109375, 0.1181640625, 0.08984375, 0.146484375, 0.0261077880859375, 0.10382080078125, 0.0368...
embed
9003972_c0
9003972
prolog
0
Title: Prolog Cuts and query results Problem title: Prolog Cuts and query results Tags: prolog Problem: Prolog Cuts and query results In a prolog program as stated below: town(a). town(b). town(c). town(d). dam(e). dam(f). link(a,b). link(a,c). link(c,d). link(b,d). link(b,c). link(c,e). link(a,e). link(d,f). neighbour...
Prolog Cuts and query results Prolog Cuts and query results prolog Prolog Cuts Prolog Cuts and query results In a prolog program as stated below: Are these the correct results from the following queries: Query 1 - ?-dam(X), once(neighbour(X,Y)),town(Y). Results: X=e Y=c; X=f Y=d Query 2 - ?-dam(X), neighbour(X,Y),!,tow...
[ 0.0498046875, 0.033447265625, 0.01031494140625, 0.0245361328125, -0.0008087158203125, 0.0032806396484375, -0.00921630859375, -0.012451171875, 0.01116943359375, -0.0152587890625, -0.0174560546875, -0.0218505859375, -0.00689697265625, 0.00933837890625, 0.00909423828125, -0.00193786621093...
[ 1250, 4867, 3003, 933, 136, 41, 1294, 50339, 502, 360, 10, 1528, 237, 11341, 35064, 15901, 6097, 70, 26785, 1295, 25632, 10484, 58836, 53, 106, 20, 705, 9, 6229, 1542, 24145, 6958, 38648, 1723, 35461, 146104, 1193, 990, 238, 420, 116, ...
[ 0.1888427734375, 0.263916015625, 0.2364501953125, 0.140380859375, 0.109619140625, 0.18994140625, 0.118896484375, 0.2362060546875, 0.186279296875, 0.024383544921875, 0.002960205078125, 0.19091796875, 0.0020751953125, 0.033538818359375, 0.08575439453125, 0.07684326171875, 0.09692382812...
embed
15456117_c0
15456117
prolog
0
Title: Remove duplicate values from a list in Prolog Problem title: Remove duplicate values from a list in Prolog Tags: prolog, list Problem: Remove duplicate values from a list in Prolog This is a case of duplicate value for which I haven't found a solution. Let's say we've got the following list: List = [ (A, B), (A,...
Remove duplicate values from a list in Prolog Remove duplicate values from a list in Prolog prolog list a Remove Prolog List Remove duplicate values from a list in Prolog This is a case of duplicate value for which I haven't found a solution. Let's say we've got the following list: A duplicate element would be an eleme...
[ 0.00154876708984375, 0.01806640625, 0.010498046875, 0.00921630859375, -0.01275634765625, 0.0020599365234375, -0.007415771484375, 0.005859375, 0.005859375, -0.0002803802490234375, -0.011474609375, 0.01043701171875, -0.00160980224609375, 0.01031494140625, -0.0147705078125, 0.033447265625...
[ 181139, 171763, 67, 142424, 1295, 5303, 1250, 4867, 23, 502, 32036, 34292, 29806, 25632, 12830, 2806, 186, 66161, 5701, 6863, 98169, 12989, 18, 26866, 7103, 49146, 6496, 1636, 6713, 1884, 903, 1672, 20594 ]
[ 0.1536865234375, 0.25048828125, 0.1676025390625, 0.2073974609375, 0.07421875, 0.1976318359375, 0.160400390625, 0.2310791015625, 0.04010009765625, 0.123291015625, 0.2015380859375, 0.1630859375, 0.05621337890625, 0.03564453125, 0.167236328125, 0.03765869140625, 0.002655029296875, 0.0...
embed
28471070_c0
28471070
prolog
0
Title: Prolog constraint Problem title: Prolog constraint Tags: clpfd, constraints, prolog Problem: Prolog constraint I have 3 Constraints for a List: list ins 1..9 all_different(list) lists in the list --> I get some lists from the list. every list from the list has to fulfill the constraint to be gapless. for example...
Prolog constraint Prolog constraint clpfd constraints prolog Prolog Prolog constraint I have 3 Constraints for a List: list ins 1..9 all_different(list) lists in the list --> I get some lists from the list. every list from the list has to fulfill the constraint to be gapless. for example: List1 = [1,3,2,4]; List2=[3,2,...
[ 0.006378173828125, -0.00872802734375, 0.00634765625, 0.01336669921875, -0.00118255615234375, 0.01397705078125, -0.0250244140625, 0.00171661376953125, -0.004730224609375, -0.0203857421875, -0.0196533203125, -0.00921630859375, 0.000583648681640625, 0.015625, -0.003173828125, 0.0044250488...
[ 1250, 4867, 158, 2816, 4288, 71, 502, 138, 1657, 32036, 5303, 1126, 756, 238778, 6562, 11907, 211394, 43599, 9393, 2203, 363, 617, 135461, 910, 115055, 32462, 163324, 6528, 5423, 12096, 12765, 48325, 19929, 21748, 67967, 214, 4902, 29806, 2...
[ 0.1600341796875, 0.242919921875, 0.1092529296875, 0.208251953125, 0.173583984375, 0.01727294921875, 0.08135986328125, 0.180908203125, 0.111572265625, 0.1759033203125, 0.1676025390625, 0.1171875, 0.05377197265625, 0.1925048828125, 0.146484375, 0.032012939453125, 0.1016845703125, 0.1...
embed
44807448_c0
44807448
prolog
0
Title: Prolog: Head of a variable list is not instantated Problem title: Prolog: Head of a variable list is not instantated Tags: instantiation-error, list, prolog Problem: Prolog: Head of a variable list is not instantated I'm writing a simple code generating a simple list with 5 numbers whose first variable should be...
Prolog: Head of a variable list is not instantated Prolog: Head of a variable list is not instantated instantiation-error list prolog Prolog Head Prolog: Head of a variable list is not instantated I'm writing a simple code generating a simple list with 5 numbers whose first variable should be positive and I'm trying to...
[ 0.0218505859375, 0.0146484375, 0.0067138671875, -0.0022430419921875, 0.004486083984375, -0.009765625, -0.000789642333984375, 0.0146484375, 0.008544921875, -0.0224609375, 0.0016632080078125, -0.0023956298828125, -0.00616455078125, 0.0205078125, 0.019287109375, -0.0107421875, 0.0314941...
[ 1250, 4867, 44816, 111, 77336, 5303, 83, 959, 34648, 27686, 14, 188800, 502, 32562, 8781, 18151, 12663, 190, 101935, 5117, 5608, 24491, 28219, 15400, 35782, 11782, 678, 25632, 18499, 8, 85779, 572, 3034, 56112, 18, 3714 ]
[ 0.12890625, 0.198486328125, 0.214599609375, 0.06951904296875, 0.2305908203125, 0.17529296875, 0.04888916015625, 0.1390380859375, 0.1519775390625, 0.1536865234375, 0.1024169921875, 0.1365966796875, 0.0755615234375, 0.046478271484375, 0.08056640625, 0.1353759765625, 0.05975341796875, ...
embed
32875805_c1
32875805
prolog
1
rights to your X11 server. See xauth(1) and xhost(1). * in: <No exception goal> ] Host stack: [23] pce_principal:send(@3221888913/prolog_debugger, icon(resource(debug))) [22] Send-method on @3221888913/prolog_debugger: prolog_debugger->initialise(0,main) [21] '$c_call_prolog' [20] pce_principal:send(new(_G397, prolog_...
rights to your X11 server. See xauth(1) and xhost(1). * in: <No exception goal> ] Host stack: [23] pce_principal:send(@3221888913/prolog_debugger, icon(resource(debug))) [22] Send-method on @3221888913/prolog_debugger: prolog_debugger->initialise(0,main) [21] '$c_call_prolog' [20] pce_principal:send(new(_G397, prolog_...
[ 0.02001953125, 0.0034942626953125, 0.0072021484375, 0.020751953125, 0.02734375, 0.00653076171875, 0.005767822265625, -0.00112152099609375, 0.00653076171875, -0.030029296875, 0.024169921875, -0.00142669677734375, 0.00164031982421875, 0.0216064453125, 0.003570556640625, 0.006011962890625...
[ 38109, 47, 1193, 1662, 10723, 5, 6872, 2459, 34, 927, 1022, 40294, 23, 5021, 131527, 69236, 100932, 177261, 12, 159144, 915, 329, 139788, 289, 39285, 981, 3117, 49543, 12183, 3454, 4867, 112, 978, 21407, 47989, 60427, 85779, 155539, 24044, ...
[ 0.240966796875, 0.08837890625, 0.1566162109375, 0.256103515625, 0.167236328125, 0.050537109375, 0.19189453125, 0.0423583984375, 0.006561279296875, 0.10675048828125, 0.1024169921875, 0.1820068359375, 0.014801025390625, 0.07452392578125, 0.173583984375, 0.20068359375, 0.162841796875, ...
embed
741854_c0
741854
prolog
0
Title: Where is Prolog used for traffic control systems? Problem title: Where is Prolog used for traffic control systems? Tags: prolog Problem: Where is Prolog used for traffic control systems? The user Laurent had an interesting reply to the question [Why hasn’t logic programming caught on?]: If you look at the influe...
Where is Prolog used for traffic control systems? Where is Prolog used for traffic control systems? prolog Where Prolog Where is Prolog used for traffic control systems? The user Laurent had an interesting reply to the question [Why hasn’t logic programming caught on?]: A question arises:
[ 0.0286865234375, 0.007415771484375, 0.00787353515625, -0.0002880096435546875, -0.0113525390625, 0.02685546875, 0.00537109375, -0.005401611328125, -0.000904083251953125, -0.0400390625, 0.0115966796875, -0.032958984375, -0.028076171875, -0.0087890625, 0.0157470703125, 0.007293701171875, ...
[ 78662, 83, 1250, 4867, 11814, 100, 83629, 6226, 76519, 502, 124103, 49041, 75836, 168754, 1556, 18, 62775, 56037, 449, 156892, 98, 9655 ]
[ 0.093017578125, 0.048004150390625, 0.18603515625, 0.2724609375, 0.129150390625, 0.051239013671875, 0.173828125, 0.2017822265625, 0.12200927734375, 0.13720703125, 0.0892333984375, 0.011199951171875, 0.0006976127624511719, 0.031982421875, 0.037628173828125, 0.0256805419921875, 0.145507...
embed
27349353_c0
27349353
prolog
0
Title: Prolog sum all throwing error Problem title: Prolog sum all throwing error Tags: sum, recursion, prolog Problem: Prolog sum all throwing error I have to write a predicates that sums all the items in a list. The items can be a list with list of list in it. for example, sum1([1,[2,3],4,[5]],X). i have some code th...
Prolog sum all throwing error Prolog sum all throwing error sum recursion prolog Prolog Prolog sum all throwing error I have to write a predicates that sums all the items in a list. The items can be a list with list of list in it. for example, sum1([1,[2,3],4,[5]],X). i have some code that SHOULD work, but is giving an...
[ 0.00787353515625, 0.00015926361083984375, 0.00762939453125, 0.0120849609375, -0.0135498046875, 0.0223388671875, -0.005950927734375, 0.0120849609375, 0.0057373046875, -0.0247802734375, 0.02734375, -0.0137939453125, 0.017578125, 0.0020599365234375, 0.03125, 0.0030364990234375, 0.013610...
[ 1250, 4867, 10554, 756, 104250, 18499, 214, 195625, 1830, 502, 765, 33022, 1653, 2063, 1636, 7, 55769, 23, 5303, 418, 155761, 617, 45963, 1542, 18151, 18883, 32616, 30693, 4488, 10750, 959, 129980, 34648, 14, 6713, 54969, 4393, 67, 137175 ]
[ 0.149169921875, 0.1966552734375, 0.22314453125, 0.162841796875, 0.185546875, 0.1929931640625, 0.0465087890625, 0.184326171875, 0.000579833984375, 0.122314453125, 0.01373291015625, 0.0899658203125, 0.1385498046875, 0.169677734375, 0.108154296875, 0.025970458984375, 0.17138671875, 0....
embed
58640938_c0
58640938
prolog
0
Title: Possible to assert a list? Problem title: Possible to assert a list? Tags: prolog Problem: Possible to assert a list? I would like to ask if it is possible to assert a list instead of singular terms? For example I have tried the following: assert(user_chosen_fruits([Grapes, Apples, Peaches])). However, when I qu...
Possible to assert a list? Possible to assert a list? prolog Possible user_chosen_fruits Grapes Apples Peaches _4872 _4878 _4884 Possible to assert a list? I would like to ask if it is possible to assert a list instead of singular terms? For example I have tried the following: However, when I queried using user_chosen_...
[ 0.01104736328125, 0.00830078125, -0.017822265625, 0.01422119140625, -0.033447265625, 0.0145263671875, -0.004852294921875, 0.014892578125, 0.00714111328125, 0.00799560546875, 0.005035400390625, -0.0023193359375, -0.00787353515625, 0.011962890625, 0.007476806640625, 0.01483154296875, 0...
[ 115861, 2661, 47, 237, 33657, 10, 5303, 32, 502, 4867, 38937, 48746, 33, 23129, 14481, 6524, 13569, 4129, 7, 92931, 17007, 183223, 304, 617, 200439, 161414, 26458, 2174, 7722, 64457, 67824, 69407, 37842, 41, 46572, 17368, 1542, 30646, 13228...
[ 0.19970703125, 0.1630859375, 0.08734130859375, 0.143798828125, 0.2880859375, 0.047515869140625, 0.271728515625, 0.0244598388671875, 0.123779296875, 0.1651611328125, 0.1839599609375, 0.137939453125, 0.1641845703125, 0.212890625, 0.16943359375, 0.1302490234375, 0.115966796875, 0.1760...
embed
27809471_c0
27809471
prolog
0
Title: Prompt does not come back Problem title: Prompt does not come back Tags: prolog, successor-arithmetics, non-termination Problem: Prompt does not come back I try to do some exercise - to represent numbers in "s representation" which means '0' is zero, s(0) is 1, s(s(0)) is 2 and so on. I tried to write predicate ...
Prompt does not come back Prompt does not come back prolog successor-arithmetics non-termination Prompt s2int Prompt does not come back I try to do some exercise - to represent numbers in "s representation" which means '0' is zero, s(0) is 1, s(s(0)) is 2 and so on. I tried to write predicate for adding "s numbers": th...
[ 0.000759124755859375, 0.016845703125, -0.00665283203125, 0.0245361328125, -0.0291748046875, 0.017578125, 0.005279541015625, -0.00010585784912109375, 0.0166015625, -0.0164794921875, 0.0264892578125, 0.00019359588623046875, -0.0113525390625, 0.00445556640625, 0.03271484375, 0.00025558471...
[ 1250, 2676, 18, 14602, 959, 1380, 4420, 502, 4867, 39457, 42, 8962, 282, 41637, 351, 720, 91407, 91, 304, 4288, 9790, 81979, 33636, 101935, 7, 18811, 26950, 2389, 25, 83, 45234, 177609, 106, 116, 37842, 33022, 1653, 2063, 67, 154107, 96...
[ 0.13232421875, 0.2161865234375, 0.1534423828125, 0.04345703125, 0.1358642578125, 0.128662109375, 0.20947265625, 0.115234375, 0.160400390625, 0.1483154296875, 0.037994384765625, 0.096923828125, 0.0435791015625, 0.013641357421875, 0.0509033203125, 0.050994873046875, 0.0531005859375, ...
embed
6194815_c0
6194815
prolog
0
Title: prolog instantiation error with =:= operator Problem title: prolog instantiation error with =:= operator Tags: prolog Problem: prolog instantiation error with =:= operator I'm writing a function called subseq which checks if one list is a subsequence of another. subseq([],[]). subseq([],[Y|Ys]). subseq([X|Xs],[Y...
prolog instantiation error with =:= operator prolog instantiation error with =:= operator prolog instantiation_error prolog instantiation error with =:= operator I'm writing a function called subseq which checks if one list is a subsequence of another. When I try subseq(X,[1,2]) I get: Why is this happening? My guess i...
[ 0.016845703125, 0.007537841796875, 0.02783203125, 0.01025390625, 0.0052490234375, -0.0091552734375, -0.002838134765625, -0.00003790855407714844, 0.01080322265625, -0.0123291015625, 0.03662109375, 0.0032501220703125, 0.0159912109375, 0.01123046875, 0.0181884765625, -0.01055908203125, ...
[ 502, 4867, 34648, 14, 18499, 678, 2203, 12, 1369, 39933, 188800, 2320, 32562, 32354, 1614, 184, 864, 12765, 5303, 83, 944, 3956, 9790, 1542, 133063, 44084, 903, 123087, 57767, 378, 268, 8035, 160404, 98, 390, 100, 214335 ]
[ 0.1611328125, 0.2276611328125, 0.09063720703125, 0.0875244140625, 0.1820068359375, 0.090576171875, 0.135498046875, 0.124267578125, 0.1712646484375, 0.264404296875, 0.17626953125, 0.00347900390625, 0.083740234375, 0.0992431640625, 0.154296875, 0.1455078125, 0.1815185546875, 0.117553...
embed
71326776_c0
71326776
prolog
0
Title: How to translate &quot;one of the ends&quot; of a list in Prolog? Problem title: How to translate &quot;one of the ends&quot; of a list in Prolog? Tags: prolog Problem: How to translate "one of the ends" of a list in Prolog? It is said that Eno is in a cinema where there are 4 seats. Eno is seated at one of the ...
How to translate &quot;one of the ends&quot; of a list in Prolog? How to translate &quot;one of the ends&quot; of a list in Prolog? prolog How Prolog How to translate "one of the ends" of a list in Prolog? It is said that Eno is in a cinema where there are 4 seats. Eno is seated at one of the ends. What I would like to...
[ 0.016845703125, 0.004241943359375, 0.01556396484375, 0.00531005859375, -0.000946044921875, -0.0008697509765625, 0.004608154296875, 0.00634765625, 0.00408935546875, -0.0419921875, 0.002105712890625, 0.00445556640625, 0.009033203125, 0.00933837890625, 0.01043701171875, -0.0205078125, 0...
[ 11249, 47, 3900, 19309, 3630, 111, 3564, 7, 5303, 23, 1250, 4867, 502, 70, 357, 31, 27076, 201, 40, 9821, 27686, 1632, 3934, 18151, 32036, 436, 140909, 1398, 37842, 927, 4390, 3611, 154663, 683, 105801, 18, 4488, 4358 ]
[ 0.05548095703125, 0.0165252685546875, 0.1737060546875, 0.193359375, 0.1650390625, 0.2196044921875, 0.202880859375, 0.09564208984375, 0.2125244140625, 0.0465087890625, 0.148681640625, 0.224609375, 0.05792236328125, 0.04119873046875, 0.1416015625, 0.1864013671875, 0.15576171875, 0.11...
embed
30297767_c0
30297767
prolog
0
Title: Take a positive integer n and produce a list that prints out a list in prolog? Problem title: Take a positive integer n and produce a list that prints out a list in prolog? Tags: prolog Problem: Take a positive integer n and produce a list that prints out a list in prolog? I am trying to write a prolog rule to t...
Take a positive integer n and produce a list that prints out a list in prolog? Take a positive integer n and produce a list that prints out a list in prolog? prolog Take X-1 Take a positive integer n and produce a list that prints out a list in prolog? I am trying to write a prolog rule to take a positive integer n and...
[ 0.0169677734375, 0.0037689208984375, -0.0179443359375, 0.0205078125, -0.02294921875, 0.01031494140625, 0.007049560546875, 0.0257568359375, 0.0191650390625, -0.0228271484375, -0.005157470703125, -0.0263671875, -0.006561279296875, 0.00982666015625, 0.0196533203125, 0.00238037109375, 0....
[ 46673, 24491, 892, 1505, 653, 27489, 5303, 28412, 1810, 502, 4867, 23, 1193, 5759, 31577, 33022, 79986, 5646, 76199, 4420, 54529, 7565, 1295, 757, 40907, 144252, 8331, 7710, 105801, 866, 16, 2806, 30646, 339, 1369, 617, 11565, 363, 4, 831...
[ 0.12451171875, 0.1878662109375, 0.1243896484375, 0.09326171875, 0.11474609375, 0.1468505859375, 0.2022705078125, 0.142822265625, 0.10693359375, 0.1558837890625, 0.2254638671875, 0.0175628662109375, 0.10675048828125, 0.15380859375, 0.064453125, 0.09051513671875, 0.165771484375, 0.10...
embed
26181455_c1
26181455
prolog
1
with some tweaking or massaging)? If the answer to 1 is yes, does that mean that any WAM heaps, stacks, memory ops, etc. would simply be normal arrays or linked lists in whatever language (Erlang or Java, or even Clojure running on the JVM for that matter) the developers were using? What I'm trying to get at is this. I...
with some tweaking or massaging)? If the answer to 1 is yes, does that mean that any WAM heaps, stacks, memory ops, etc. would simply be normal arrays or linked lists in whatever language (Erlang or Java, or even Clojure running on the JVM for that matter) the developers were using? What I'm trying to get at is this. I...
[ 0.026123046875, -0.0002574920654296875, -0.003082275390625, 0.0216064453125, 0.000072479248046875, 0.0185546875, -0.01116943359375, -0.000644683837890625, -0.000576019287109375, -0.000545501708984375, -0.00115966796875, 0.024658203125, 0.0022125244140625, -0.00860595703125, -0.0181884765...
[ 77488, 13, 6627, 9966, 35166, 72272, 29459, 4336, 594, 17305, 6423, 177261, 98323, 233, 2806, 42856, 186, 3638, 10298, 4778, 3126, 5303, 89778, 46876, 18468, 3066, 41925, 51053, 461, 107, 51042, 821, 47599, 106001, 17368, 31577, 99, 70, 256...
[ 0.05029296875, 0.03289794921875, 0.1160888671875, 0.069091796875, 0.0220184326171875, 0.0606689453125, 0.04278564453125, 0.21728515625, 0.24609375, 0.1375732421875, 0.07989501953125, 0.140625, 0.109375, 0.1383056640625, 0.01617431640625, 0.012908935546875, 0.0101318359375, 0.102478...
embed
30109287_c0
30109287
prolog
0
Title: Prolog: How come this loop doesn&#x27;t work? Problem title: Prolog: How come this loop doesn&#x27;t work? Tags: loops, recursion, prolog Problem: Prolog: How come this loop doesn't work? I just started learning prolog recently and am confused about how the recursion works. I have written this code: test(X,B):- ...
Prolog: How come this loop doesn&#x27;t work? Prolog: How come this loop doesn&#x27;t work? loops recursion prolog Prolog How Prolog: How come this loop doesn't work? I just started learning prolog recently and am confused about how the recursion works. I have written this code: I want it to return 20 or 21, but instea...
[ 0.015625, 0.0098876953125, -0.006591796875, 0.024169921875, 0.01092529296875, 0.0220947265625, -0.0164794921875, 0.004180908203125, 0.0172119140625, -0.0157470703125, 0.0234375, -0.005218505859375, -0.02490234375, 0.007659912109375, 0.045166015625, 0.0023345947265625, 0.0206298828125...
[ 1250, 4867, 11249, 1380, 903, 40956, 22027, 3768, 18, 4488, 12, 195625, 1830, 502, 52080, 55681, 3642, 43240, 59121, 18151, 3444, 30646, 387, 21416, 64457, 11782, 3034, 105801, 1542, 305, 645, 13438, 19107, 20028, 24763, 1884, 149016, 44691, ...
[ 0.1864013671875, 0.244140625, 0.0906982421875, 0.1260986328125, 0.106201171875, 0.25146484375, 0.155029296875, 0.039703369140625, 0.1656494140625, 0.16552734375, 0.005157470703125, 0.21337890625, 0.1246337890625, 0.145751953125, 0.050048828125, 0.036224365234375, 0.013458251953125, ...
embed
32914922_c0
32914922
prolog
0
Title: Prolog: Size of list matches an integer Problem title: Prolog: Size of list matches an integer Tags: prolog, list Problem: Prolog: Size of list matches an integer I'm very new to prolog. I have a size of list predicate. I'm trying to make another predicate that takes two arguments (an int, and a list) and it cal...
Prolog: Size of list matches an integer Prolog: Size of list matches an integer prolog list Prolog Size Prolog: Size of list matches an integer I'm very new to prolog. I have a size of list predicate. I'm trying to make another predicate that takes two arguments (an int, and a list) and it calls the size of list predic...
[ 0.0076904296875, -0.007415771484375, 0.01165771484375, 0.01708984375, -0.0234375, -0.00250244140625, -0.0035400390625, 0.01214599609375, 0.018798828125, 0.012939453125, 0.0194091796875, 0.0022430419921875, -0.002349853515625, 0.00830078125, 0.0252685546875, -0.01312255859375, 0.02575...
[ 1250, 4867, 80378, 111, 5303, 14858, 90, 892, 1505, 12, 142, 502, 4552, 3525, 13267, 1653, 2063, 67, 31577, 3249, 15700, 51776, 6626, 10750, 23, 18, 11782, 115081, 30646, 29568, 2174, 2060, 20375, 81907 ]
[ 0.183349609375, 0.2197265625, 0.220947265625, 0.13134765625, 0.2158203125, 0.22509765625, 0.043701171875, 0.15185546875, 0.1220703125, 0.0217132568359375, 0.0188751220703125, 0.1304931640625, 0.002532958984375, 0.0330810546875, 0.1756591796875, 0.1463623046875, 0.16552734375, 0.066...
embed
15721185_c0
15721185
prolog
0
Title: constraint programming, repetition of number in a list, prolog Problem title: constraint programming, repetition of number in a list, prolog Tags: constraint-programming, clpfd, prolog Problem: constraint programming, repetition of number in a list, prolog How can I limit the repetition of a number in a list? Wh...
constraint programming, repetition of number in a list, prolog constraint programming, repetition of number in a list, prolog constraint-programming clpfd prolog WANTED CONSTRAINT constraint programming, repetition of number in a list, prolog How can I limit the repetition of a number in a list? What is a suitable cons...
[ -0.0242919921875, 0.0113525390625, 0.0194091796875, 0.00102996826171875, 0.0089111328125, 0.002960205078125, -0.012939453125, 0.0146484375, 0.0218505859375, -0.029541015625, -0.0201416015625, -0.030517578125, -0.000278472900390625, 0.01336669921875, 0.01409912109375, -0.003936767578125...
[ 158, 2816, 4288, 56037, 449, 57346, 1363, 111, 14012, 23, 5303, 502, 4867, 28966, 39557, 71, 53912, 14452, 59020, 59537, 11249, 831, 87, 17475, 70, 10, 202319, 25632, 18151, 27781, 121413, 84751 ]
[ 0.1065673828125, 0.19287109375, 0.1429443359375, 0.165771484375, 0.05999755859375, 0.29541015625, 0.1224365234375, 0.02984619140625, 0.1846923828125, 0.0792236328125, 0.2142333984375, 0.09783935546875, 0.164794921875, 0.11474609375, 0.0225677490234375, 0.06195068359375, 0.06207275390...
embed
10365340_c0
10365340
prolog
0
Title: Command line argument vectors in Prolog? Problem title: Command line argument vectors in Prolog? Tags: prolog Problem: Command line argument vectors in Prolog? Do they exist? I have written a program that solves sudoku puzzles, and it takes 3 steps to run. > prolog > consult(sudoku). > solve(puzzle). I'm looking...
Command line argument vectors in Prolog? Command line argument vectors in Prolog? prolog Command Prolog Command line argument vectors in Prolog? Do they exist? I have written a program that solves sudoku puzzles, and it takes 3 steps to run. I'm looking for a way to do something like and be done with it. Is there a way...
[ 0.0174560546875, 0.021240234375, -0.008544921875, 0.0164794921875, -0.0177001953125, 0.0235595703125, -0.0016326904296875, -0.011962890625, -0.0274658203125, -0.031982421875, -0.015869140625, -0.01019287109375, -0.01348876953125, 0.000843048095703125, -0.0031585693359375, 0.00723266601...
[ 123573, 13315, 10750, 22834, 22230, 23, 1250, 4867, 502, 984, 1836, 32316, 59121, 1528, 86869, 8932, 38067, 104192, 51776, 138, 98441, 11675, 16487, 3917, 1884, 16940, 678, 54, 5881, 33022, 4358, 313, 46876, 209806 ]
[ 0.197998046875, 0.149658203125, 0.2325439453125, 0.2364501953125, 0.2081298828125, 0.09417724609375, 0.1810302734375, 0.259521484375, 0.11279296875, 0.0213775634765625, 0.052398681640625, 0.147216796875, 0.075439453125, 0.110107421875, 0.123779296875, 0.113037109375, 0.1943359375, ...
embed
12284873_c1
12284873
prolog
1
)))) v w. - or - Output: (p & ((q & h) v (r & h))) & (h <-> s & (t v u))) v w. The result should be a single formula, not anymore DNF , which is more compact than the binary decision diagram algorithms which uses only disjunction and conjunction, and the prepositional variables already found in the original DNF. Here i...
)))) v w. - or - Output: (p & ((q & h) v (r & h))) & (h <-> s & (t v u))) v w. The result should be a single formula, not anymore DNF , which is more compact than the binary decision diagram algorithms which uses only disjunction and conjunction, and the prepositional variables already found in the original DNF. Here i...
[ -0.01055908203125, 0.047119140625, -0.004150390625, 0.02880859375, -0.0014190673828125, 0.0022430419921875, -0.005889892578125, 0.00531005859375, 0.001800537109375, -0.00537109375, -0.016845703125, 0.004608154296875, 0.013427734375, 0.007415771484375, -0.025390625, 0.02099609375, 0.0...
[ 6, 80126, 81, 148, 5, 20, 707, 13538, 7077, 12, 254, 619, 60494, 864, 1096, 42, 32149, 127, 103607, 91, 18, 75, 16750, 5608, 186, 11001, 26168, 959, 176683, 391, 73493, 1286, 94928, 70, 2394, 6635, 51957, 117233, 234873, 4527, 4734, 2...
[ 0.02215576171875, 0.2486572265625, 0.2294921875, 0.1827392578125, 0.060394287109375, 0.0693359375, 0.15087890625, 0.1629638671875, 0.1180419921875, 0.0300140380859375, 0.10540771484375, 0.168701171875, 0.0009765625, 0.10736083984375, 0.128173828125, 0.0823974609375, 0.132080078125, ...
embed
30327151_c0
30327151
prolog
0
Title: How to multiply all elements of two lists with each other in Prolog Problem title: How to multiply all elements of two lists with each other in Prolog Tags: prolog, list Problem: How to multiply all elements of two lists with each other in Prolog I am thinking how to multiply all elements of two list with each o...
How to multiply all elements of two lists with each other in Prolog How to multiply all elements of two lists with each other in Prolog prolog list How Prolog List3 List1 List2 How to multiply all elements of two lists with each other in Prolog I am thinking how to multiply all elements of two list with each other. The...
[ 0.00118255615234375, 0.005340576171875, -0.00616455078125, 0.0164794921875, -0.0184326171875, 0.0203857421875, -0.01043701171875, 0.0059814453125, 0.00640869140625, -0.0103759765625, 0.0012054443359375, -0.004180908203125, 0.0016326904296875, 0.003875732421875, -0.0234375, 0.0052185058...
[ 11249, 47, 6024, 62479, 756, 80854, 6626, 5303, 7, 678, 12638, 3789, 23, 1250, 4867, 502, 32036, 363, 418, 304, 47644, 3642, 3444, 3884, 50339, 5608, 70541, 425, 910, 966, 7722, 54 ]
[ 0.067626953125, 0.0340576171875, 0.1806640625, 0.2391357421875, 0.1533203125, 0.207275390625, 0.1671142578125, 0.218505859375, 0.00048828125, 0.15087890625, 0.0665283203125, 0.143798828125, 0.047698974609375, 0.1658935546875, 0.2467041015625, 0.13671875, 0.16943359375, 0.1539306640...
embed
76846474_c1
76846474
prolog
1
3, c] ; false. However, if the lists are the same length, then I get the correct binding, but twice, meaning that after the first one is shown, I press the ; key, and get the same binding. I don't need to press ; in this case... weave([1,2,3], [a,b,c], Res). Res = [1, a, 2, b, 3, c] ; Res = [1, a, 2, b, 3, c]. Anyone a...
3, c] ; false. However, if the lists are the same length, then I get the correct binding, but twice, meaning that after the first one is shown, I press the ; key, and get the same binding. I don't need to press ; in this case... weave([1,2,3], [a,b,c], Res). Res = [1, a, 2, b, 3, c] ; Res = [1, a, 2, b, 3, c]. Anyone a...
[ 0.0128173828125, 0.0240478515625, -0.000058650970458984375, 0.000789642333984375, 0.00384521484375, 0.03271484375, -0.0008544921875, -0.0004291534423828125, 0.0262451171875, -0.0264892578125, -0.0010223388671875, -0.0225830078125, 0.01507568359375, 0.007049560546875, -0.00799560546875, ...
[ 138, 501, 98320, 5303, 7, 5701, 140909, 2046, 26785, 128239, 186351, 7103, 5117, 127887, 24234, 2819, 22799, 3871, 642, 8216, 133063, 96386, 238, 9624, 2203, 116, 876, 19048, 73342, 3688, 6044, 1653, 2063, 67, 32316, 91177, 46876, 32562, 10...
[ 0.216064453125, 0.1092529296875, 0.221435546875, 0.224853515625, 0.08502197265625, 0.0782470703125, 0.1304931640625, 0.0264739990234375, 0.125244140625, 0.2254638671875, 0.184814453125, 0.034454345703125, 0.016632080078125, 0.1173095703125, 0.1416015625, 0.059326171875, 0.20080566406...
embed
20734675_c0
20734675
prolog
0
Title: xpce prolog consult program Problem title: xpce prolog consult program Tags: xpce, prolog Problem: xpce prolog consult program in this url http://www.commonkads.uva.nl/frameset-commonkads.html on tools tab there is an example program in prolog i download it and consult main_xpce but no window appear to show prog...
xpce prolog consult program xpce prolog consult program xpce prolog xpce prolog consult program in this url http://www.commonkads.uva.nl/frameset-commonkads.html on tools tab there is an example program in prolog i download it and consult main_xpce but no window appear to show program this is a xpce prolog program and ...
[ 0.0341796875, 0.002044677734375, 0.004852294921875, 0.0196533203125, -0.01239013671875, 0.03271484375, 0.007080078125, 0.0244140625, -0.0135498046875, -0.045166015625, 0.003875732421875, -0.00714111328125, 0.00872802734375, -0.01397705078125, 0.01531982421875, -0.0037078857421875, 0....
[ 1022, 254, 329, 502, 4867, 75463, 1528, 25002, 3796, 10870, 7, 26247, 160328, 3509, 277, 72977, 20928, 27781, 7026, 5201, 425, 110, 76896, 108975, 7639, 8110, 21373, 2967, 53397, 23, 91, 2452, 27992, 1884, 3220, 54825, 38, 5854, 15938, 31...
[ 0.082763671875, 0.09527587890625, 0.179443359375, 0.1446533203125, 0.22509765625, 0.302734375, 0.17919921875, 0.03387451171875, 0.105224609375, 0.0994873046875, 0.0789794921875, 0.122314453125, 0.0540771484375, 0.1080322265625, 0.011932373046875, 0.104248046875, 0.01141357421875, 0...
embed
44086550_c0
44086550
prolog
0
Title: Specific example of recursion in Prolog Problem title: Specific example of recursion in Prolog Tags: recursion, prolog Problem: Specific example of recursion in Prolog polarbear([],H,[H]). polarbear([H|T],Y,[H|Z]):- polarbear(T,Y,Z). This is the prolog code. When entering ?-polarbear([1,2], 6, P). Get P =[1,2,6]...
Specific example of recursion in Prolog Specific example of recursion in Prolog recursion prolog Specific Prolog Specific example of recursion in Prolog This is the prolog code. When entering ?-polarbear([1,2], 6, P). Get P =[1,2,6]. The thing is I just don't understand how it's working and I've been trying to work out...
[ 0.025146484375, 0.037841796875, 0.00628662109375, 0.00823974609375, 0.0076904296875, 0.0283203125, -0.003936767578125, -0.0002117156982421875, 0.00811767578125, 0.0005950927734375, 0.0255126953125, -0.03369140625, -0.017333984375, -0.01055908203125, 0.0264892578125, 0.002227783203125, ...
[ 209052, 27781, 195625, 1830, 23, 1250, 4867, 502, 18151, 22, 33558, 705, 69990, 58669, 147, 133063, 305, 436, 20779, 2203, 189126, 13580, 18, 28219, 3642, 442, 20697, 4488, 20594, 2367, 16981, 196219, 14602, 77947 ]
[ 0.1812744140625, 0.2213134765625, 0.2430419921875, 0.1297607421875, 0.022857666015625, 0.186767578125, 0.264404296875, 0.1689453125, 0.197998046875, 0.067626953125, 0.110107421875, 0.1214599609375, 0.1162109375, 0.0794677734375, 0.1778564453125, 0.102783203125, 0.10760498046875, 0....
embed
23464889_c0
23464889
prolog
0
Title: Prolog , Need to find out composite number from a list and sum Problem title: Prolog , Need to find out composite number from a list and sum Tags: prolog Problem: Prolog , Need to find out composite number from a list and sum I am new in prolog, when user input list of number it will only sum the composite numbe...
Prolog , Need to find out composite number from a list and sum Prolog , Need to find out composite number from a list and sum prolog a Prolog Need list_sum Head Tail TotalSum Sum1 Total Prolog , Need to find out composite number from a list and sum I am new in prolog, when user input list of number it will only sum the...
[ -0.0172119140625, -0.0037384033203125, 0.0244140625, 0.03857421875, -0.0125732421875, 0.0289306640625, -0.0089111328125, 0.02587890625, 0.00933837890625, -0.01153564453125, -0.010498046875, -0.0277099609375, -0.001922607421875, 0.01953125, 0.0186767578125, 0.000766754150390625, 0.020...
[ 1250, 4867, 52889, 7413, 1810, 375, 77087, 13, 14012, 1295, 5303, 136, 10554, 502, 11832, 44816, 1218, 379, 33867, 294, 316, 36335, 418, 3525, 38937, 107730, 4734, 103332, 201, 151664, 2060, 16940, 111, 23, 5, 6183, 2967, 831, 4171, 390, ...
[ 0.16064453125, 0.2415771484375, 0.069580078125, 0.1170654296875, 0.0579833984375, 0.1383056640625, 0.262939453125, 0.084228515625, 0.1893310546875, 0.0931396484375, 0.201171875, 0.039276123046875, 0.23583984375, 0.1497802734375, 0.199462890625, 0.09844970703125, 0.05303955078125, 0...
embed
31301678_c0
31301678
prolog
0
Title: Primality test predicate isPrime/1 in Prolog Problem title: Primality test predicate isPrime/1 in Prolog Tags: primes, prolog Problem: Primality test predicate isPrime/1 in Prolog I am trying to understand solutions of exercises in order to prepare my logic programming exam and somehow I could not understand the...
Primality test predicate isPrime/1 in Prolog Primality test predicate isPrime/1 in Prolog primes prolog Primality Prolog LOW Y-1 Primality test predicate isPrime/1 in Prolog I am trying to understand solutions of exercises in order to prepare my logic programming exam and somehow I could not understand the logic of the...
[ -0.0086669921875, 0.0052490234375, 0.0234375, 0.0125732421875, 0.000736236572265625, 0.0234375, 0.017822265625, -0.01806640625, 0.005706787109375, -0.0031585693359375, 0.0028839111328125, 0.001708984375, -0.0301513671875, -0.0341796875, 0.00127410888671875, 0.02490234375, 0.004394531...
[ 44506, 134393, 3034, 1653, 2063, 83, 145111, 13, 11583, 1250, 4867, 67, 20809, 502, 143141, 990, 5759, 47, 28219, 51347, 81979, 7, 114606, 62775, 56037, 42276, 5809, 959, 111, 70, 18151, 35064, 5868, 11853, 191147, 22936, 73342, 163 ]
[ 0.216552734375, 0.151123046875, 0.1866455078125, 0.1566162109375, 0.1717529296875, 0.12841796875, 0.167724609375, 0.065673828125, 0.174072265625, 0.175048828125, 0.2255859375, 0.005218505859375, 0.1441650390625, 0.1124267578125, 0.1787109375, 0.1370849609375, 0.12548828125, 0.00228...
embed
50531571_c0
50531571
prolog
0
Title: From string to list in prolog Problem title: From string to list in prolog Tags: prolog Problem: From string to list in prolog In Prolog i have created a simple program that takes as input an atomic string, read it via the read operator and then trasform it into a list with the ASCII codes of the string's charac...
From string to list in prolog From string to list in prolog prolog string_list string_to_list From string to list in prolog In Prolog i have created a simple program that takes as input an atomic string, read it via the read operator and then trasform it into a list with the ASCII codes of the string's characted. Howev...
[ -0.0000762939453125, -0.006500244140625, -0.00238037109375, 0.033447265625, -0.01019287109375, 0.0120849609375, -0.003997802734375, -0.00131988525390625, 0.01373291015625, -0.0439453125, 0.0068359375, -0.0301513671875, -0.01239013671875, 0.0201416015625, -0.01300048828125, -0.005920410...
[ 28090, 79315, 47, 5303, 23, 502, 4867, 6562, 188, 1250, 75935, 8781, 1528, 107730, 34627, 12301, 39933, 5848, 5037, 125429, 10001, 18151, 21441, 89829, 11814, 88303, 73, 11389, 40407, 12601, 4527, 1653, 2063, 67, 27489, 5701, 140992, 15490, ...
[ 0.1131591796875, 0.2763671875, 0.10748291015625, 0.2330322265625, 0.1119384765625, 0.1412353515625, 0.2135009765625, 0.229248046875, 0.1690673828125, 0.1280517578125, 0.05291748046875, 0.0556640625, 0.1270751953125, 0.132080078125, 0.1153564453125, 0.1431884765625, 0.2208251953125, ...
embed
28949621_c0
28949621
prolog
0
Title: How to shortern a predicate that prints depending on a condition Problem title: How to shortern a predicate that prints depending on a condition Tags: prolog Problem: How to shortern a predicate that prints depending on a condition So I have something like this: main :- % Check whether B,C,D is equal to A ... , ...
How to shortern a predicate that prints depending on a condition How to shortern a predicate that prints depending on a condition prolog How Check Relevant How to shortern a predicate that prints depending on a condition So I have something like this: Is there any way that this could be shortened but still print the re...
[ -0.00104522705078125, 0.01361083984375, -0.0048828125, 0.0322265625, -0.005523681640625, -0.00070953369140625, 0.0032958984375, -0.00104522705078125, -0.003082275390625, 0.01214599609375, -0.01202392578125, -0.008056640625, 0.0025177001953125, 0.005584716796875, 0.00176239013671875, 0....
[ 11249, 47, 16610, 9022, 1653, 2063, 67, 28412, 8, 96819, 98, 35431, 450, 502, 4867, 38679, 853, 133, 30624, 7, 765, 1884, 903, 2685, 2499, 3917, 5809, 33, 1284, 7464, 70, 29191, 31330, 805, 120820, 3034, 43581, 55300, 959, 4552, 26267 ]
[ 0.05718994140625, 0.045135498046875, 0.191650390625, 0.2412109375, 0.1627197265625, 0.205810546875, 0.12353515625, 0.1729736328125, 0.06451416015625, 0.1756591796875, 0.06304931640625, 0.2109375, 0.013824462890625, 0.1412353515625, 0.2137451171875, 0.1634521484375, 0.0391845703125, ...
embed
55457002_c0
55457002
prolog
0
Title: Calling facts in query Problem title: Calling facts in query Tags: prolog Problem: Calling facts in query This is my code: sentence([['o'],['m','e','n','i','n','o'],['a','l','e','g','r','e']]). lastWord(X,[X]). lastWord(X,[_|Z]) :- lastWord(X,Z). If I try lastWord(X,[1,2,3]). or even lastWord(X,[['o'],['m','e','...
Calling facts in query Calling facts in query prolog Calling Calling facts in query This is my code: If I try lastWord(X,[1,2,3]). or even lastWord(X,[['o'],['m','e','n','i','n','o'],['a','l','e','g','r','e']]). I get what I want (which is, of course, the last element of the list (in the examples, 3 and ['a','l','e','g...
[ 0.0184326171875, 0.01287841796875, -0.005523681640625, 0.0184326171875, -0.008544921875, -0.006378173828125, 0.010986328125, 0.0107421875, 0.00994873046875, -0.0400390625, 0.005126953125, -0.01507568359375, -0.0201416015625, 0.000690460205078125, -0.00360107421875, -0.00408935546875, ...
[ 26265, 214, 15824, 7, 23, 41, 1294, 502, 4867, 18151, 4263, 9790, 4568, 164805, 1542, 133063, 96386, 31, 39, 13, 14, 11, 141, 2046, 2367, 87, 3444, 12830, 5303, 27781, 138, 4966, 149357, 1723, 98320, 831, 85763, 61924, 71, 903, 12832, ...
[ 0.179931640625, 0.04498291015625, 0.211181640625, 0.1031494140625, 0.0946044921875, 0.176513671875, 0.12060546875, 0.140869140625, 0.184814453125, 0.141357421875, 0.000213623046875, 0.1246337890625, 0.2091064453125, 0.225341796875, 0.0528564453125, 0.06597900390625, 0.0733642578125, ...
embed
38283683_c0
38283683
prolog
0
Title: Index of first element greater than X (Prolog) Problem title: Index of first element greater than X (Prolog) Tags: list, prolog, clpfd Problem: Index of first element greater than X (Prolog) I am aware on how to find the index of a specific element in Prolog but is there a way to find the index of the first inst...
Index of first element greater than X (Prolog) Index of first element greater than X (Prolog) list prolog clpfd Index Prolog Index of first element greater than X (Prolog) I am aware on how to find the index of a specific element in Prolog but is there a way to find the index of the first instance of a number greater t...
[ 0.002593994140625, 0.0093994140625, 0.0020904541015625, -0.010009765625, -0.006988525390625, 0.0181884765625, 0.022216796875, -0.0101318359375, 0.01470947265625, -0.0233154296875, -0.00518798828125, -0.0142822265625, -0.032958984375, -0.00171661376953125, 0.01904296875, 0.0072631835937...
[ 31471, 111, 5117, 12830, 117396, 3501, 1193, 10752, 4867, 5303, 502, 39557, 71, 1250, 107419, 3642, 7413, 63262, 29458, 23, 3917, 110527, 14012, 765, 756, 64333, 1284, 96759, 1632, 11249, 5809, 1672, 90791, 106, 6183, 3525, 4127, 1614, 519,...
[ 0.28857421875, 0.047607421875, 0.1776123046875, 0.209716796875, 0.1856689453125, 0.09521484375, 0.1746826171875, 0.1612548828125, 0.260009765625, 0.12841796875, 0.1033935546875, 0.04864501953125, 0.09503173828125, 0.1693115234375, 0.054412841796875, 0.033843994140625, 0.135009765625,...
embed
1917607_c0
1917607
prolog
0
Title: Relational/Logic Programming in Python? Problem title: Relational/Logic Programming in Python? Tags: python, prolog, logic-programming Problem: Relational/Logic Programming in Python? I'm a longtime python developer and recently have been introduced to Prolog. I love the concept of using relationship rules for c...
Relational/Logic Programming in Python? Relational/Logic Programming in Python? python prolog logic-programming Relational Logic Programming Python Relational/Logic Programming in Python? I'm a longtime python developer and recently have been introduced to Prolog. I love the concept of using relationship rules for cert...
[ 0.0223388671875, 0.031494140625, 0.016357421875, 0.0047607421875, -0.0038299560546875, 0.01409912109375, -0.017578125, 0.0021820068359375, -0.01446533203125, -0.045166015625, 0.004669189453125, 0.0072021484375, -0.00860595703125, -0.01141357421875, 0.0054931640625, -0.0089111328125, ...
[ 116822, 289, 64, 113972, 1771, 27958, 214, 23, 145581, 17198, 50828, 502, 4867, 62775, 28966, 50592, 238, 6032, 106001, 65508, 1250, 5161, 23755, 17368, 76755, 91736, 8562, 66211, 15190, 59843, 4127, 35773, 10484, 100, 56037, 449, 157318, 181...
[ 0.2286376953125, 0.16943359375, 0.021270751953125, 0.2149658203125, 0.130615234375, 0.2099609375, 0.1329345703125, 0.118896484375, 0.268798828125, 0.0860595703125, 0.1590576171875, 0.0997314453125, 0.205322265625, 0.260986328125, 0.176025390625, 0.22119140625, 0.075439453125, 0.020...
embed
78216364_c0
78216364
prolog
0
Title: Making nested list of consecutive numbers in Prolog Problem title: Making nested list of consecutive numbers in Prolog Tags: recursion, prolog, list Problem: Making nested list of consecutive numbers in Prolog Can anyone check whether this is a complete BS of a code or not. Obviously it doesn't work because I'm ...
Making nested list of consecutive numbers in Prolog Making nested list of consecutive numbers in Prolog recursion prolog list Making Prolog Out Making nested list of consecutive numbers in Prolog Can anyone check whether this is a complete BS of a code or not. Obviously it doesn't work because I'm getting false as answ...
[ -0.0013885498046875, 0.01513671875, 0.0004253387451171875, -0.0003986358642578125, 0.00958251953125, 0.039794921875, -0.00933837890625, 0.0113525390625, 0.003204345703125, -0.0130615234375, -0.001190185546875, -0.0263671875, 0.00604248046875, 0.027099609375, 0.004638671875, 0.000717163...
[ 13676, 8512, 71, 5303, 148390, 101935, 1250, 4867, 214, 23, 195625, 1830, 502, 13538, 13, 35672, 12765, 36766, 903, 83, 10, 28484, 84145, 111, 18151, 707, 959, 22027, 18, 4488, 98320, 35166, 6165, 3714, 2174, 98, 7108, 28560, 112668, 8672...
[ 0.0810546875, 0.250244140625, 0.09661865234375, 0.1884765625, 0.1959228515625, 0.153564453125, 0.1650390625, 0.2393798828125, 0.047088623046875, 0.005279541015625, 0.1436767578125, 0.026397705078125, 0.11083984375, 0.151611328125, 0.01031494140625, 0.0430908203125, 0.1793212890625, ...
embed
73709513_c0
73709513
prolog
0
Title: Syntax error: Operator expected in my code Problem title: Syntax error: Operator expected in my code Tags: prolog Problem: Syntax error: Operator expected in my code I am a beginner at Prolog so I got this piece of code but I don't understand why it doesn't work max([Max],Max). max([H1,H2|T],Max):- H1 > H2, max(...
Syntax error: Operator expected in my code Syntax error: Operator expected in my code prolog Syntax Operator Max Pozitia Syntax error: Operator expected in my code I am a beginner at Prolog so I got this piece of code but I don't understand why it doesn't work The error I got is Syntax error: Operator expected . I don'...
[ 0.0021209716796875, 0.005523681640625, -0.000438690185546875, 0.0235595703125, -0.0123291015625, 0.0191650390625, -0.0167236328125, 0.0245361328125, 0.0067138671875, -0.054443359375, 0.0111083984375, -0.022705078125, 0.00201416015625, -0.0211181640625, 0.0218505859375, -0.0127563476562...
[ 19010, 86531, 18499, 150922, 84751, 23, 759, 18151, 502, 4867, 9920, 22873, 40705, 1679, 1250, 63847, 2301, 18, 28219, 15400, 22027, 4488, 4163, 83, 38 ]
[ 0.1319580078125, 0.205810546875, 0.1925048828125, 0.275390625, 0.2352294921875, 0.06622314453125, 0.07501220703125, 0.16796875, 0.094482421875, 0.210205078125, 0.170654296875, 0.1279296875, 0.229736328125, 0.05133056640625, 0.10845947265625, 0.036041259765625, 0.041656494140625, 0....
embed
19462390_c0
19462390
prolog
0
Title: PROLOG - DCG parsing Problem title: PROLOG - DCG parsing Tags: prolog, dcg Problem: PROLOG - DCG parsing Hello I am new Prolog and DGC.I want to write a DCG to parse time expressions like 10.20 am or 12 oclock. how can I check 10.20 am is valid expression or not for Olcock I wrote some code. oclock --> digit1,ph...
PROLOG - DCG parsing PROLOG - DCG parsing prolog dcg PROLOG DCG digit1 phrase1 Oclock PROLOG - DCG parsing Hello I am new Prolog and DGC.I want to write a DCG to parse time expressions like 10.20 am or 12 oclock. how can I check 10.20 am is valid expression or not for Olcock I wrote some code. i ma checking by query ca...
[ 0.0174560546875, -0.00933837890625, 0.0006866455078125, 0.031982421875, 0.01025390625, -0.00750732421875, -0.015869140625, -0.015869140625, 0.0089111328125, -0.027587890625, -0.0150146484375, -0.01171875, -0.0135498046875, -0.0146484375, 0, 0.0162353515625, 0.002349853515625, 0.017...
[ 10514, 47510, 391, 56367, 366, 6953, 502, 4867, 104, 238, 177, 153939, 418, 113860, 180, 21135, 35378, 3525, 1250, 69657, 3444, 33022, 184, 1733, 125195, 1884, 4068, 1549, 444, 427, 44043, 3642, 831, 12765, 83, 35604, 707, 959, 100, 9295,...
[ 0.1590576171875, 0.21728515625, 0.0931396484375, 0.213134765625, 0.1539306640625, 0.0587158203125, 0.085205078125, 0.2247314453125, 0.0030517578125, 0.0242919921875, 0.069091796875, 0.1162109375, 0.02679443359375, 0.1817626953125, 0.06866455078125, 0.1953125, 0.039459228515625, 0.0...
embed
33980360_c0
33980360
prolog
0
Title: Prolog multiply all elements of a list Problem title: Prolog multiply all elements of a list Tags: logic-programming, prolog Problem: Prolog multiply all elements of a list I want to define a predicate in Prolog, prod_list/2 that multiplies every element of a list. I'm having problem with the empty list wish the...
Prolog multiply all elements of a list Prolog multiply all elements of a list logic-programming prolog Prolog prod_list Product Rest Prolog multiply all elements of a list I want to define a predicate in Prolog, prod_list/2 that multiplies every element of a list. I'm having problem with the empty list wish the product...
[ -0.012939453125, 0.0184326171875, 0.0030975341796875, 0.0198974609375, -0.028076171875, 0.017822265625, -0.00933837890625, 0.004791259765625, 0.004302978515625, -0.02587890625, 0.01611328125, 0.00003886222839355469, -0.00860595703125, 0.000926971435546875, -0.00531005859375, 0.00866699...
[ 1250, 4867, 6024, 62479, 756, 80854, 111, 5303, 62775, 28966, 502, 71, 6562, 73111, 49756, 3444, 61924, 1653, 2063, 67, 23, 12477, 118126, 90, 11907, 12830, 2967, 201505, 32599, 70, 12996, 5608, 186, 45234, 64457, 2046, 98320, 18151, 50339,...
[ 0.185791015625, 0.258056640625, 0.1600341796875, 0.1678466796875, 0.15478515625, 0.1966552734375, 0.034820556640625, 0.1961669921875, 0.09259033203125, 0.080810546875, 0.145263671875, 0.1273193359375, 0.2001953125, 0.23486328125, 0.179931640625, 0.039947509765625, 0.1419677734375, ...
embed