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
39547762_c0
39547762
prolog
0
Title: Logical not() in Prolog Problem title: Logical not() in Prolog Tags: prolog Problem: Logical not() in Prolog Okay were trying to solve a simple Prolog problem, we have a given programm a. f(X) :- f(X). and a given query not(a). which will obviously return false, question is how can we change the Programm, not th...
Logical not() in Prolog Logical not() in Prolog prolog Logical Prolog Logical not() in Prolog Okay were trying to solve a simple Prolog problem, we have a given programm and a given query which will obviously return false, question is how can we change the Programm, not the query, to have it return true.
[ 0.0098876953125, 0.013427734375, 0.020263671875, 0.0216064453125, -0.0184326171875, 0.02001953125, 0.0024261474609375, -0.0040283203125, -0.00946044921875, -0.0167236328125, -0.00970458984375, 0.006683349609375, -0.02294921875, 0.014892578125, 0.0186767578125, -0.000690460205078125, ...
[ 13146, 21533, 959, 132, 1250, 4867, 23, 502, 86869, 8781, 2967, 34475, 28966, 136, 41, 1294, 171259, 30646, 98320, 3642, 831, 642, 15549, 70, 27958, 47, 765, 29568 ]
[ 0.2166748046875, 0.14453125, 0.2449951171875, 0.047393798828125, 0.18505859375, 0.252685546875, 0.02447509765625, 0.12744140625, 0.04205322265625, 0.0201568603515625, 0.058135986328125, 0.0367431640625, 0.1552734375, 0.0242919921875, 0.091552734375, 0.07330322265625, 0.02684020996093...
embed
59772777_c0
59772777
prolog
0
Title: Delete from list in SWI-Prolog Problem title: Delete from list in SWI-Prolog Tags: prolog Problem: Delete from list in SWI-Prolog I'm beginner in SWI-Prolog and I have a problem. Please help me. How can I delete the last occurence of 9 from a list? Examples: ?- delete([9,9,9]) [9,9] ?- delete([9,4,1,2,3,9,53,2,9...
Delete from list in SWI-Prolog Delete from list in SWI-Prolog prolog list Delete SWI-Prolog Delete from list in SWI-Prolog I'm beginner in SWI-Prolog and I have a problem. Please help me. How can I delete the last occurence of 9 from a list? Examples:
[ 0.00286865234375, 0.0267333984375, -0.00335693359375, 0.016845703125, -0.01611328125, 0.0059814453125, 0.000911712646484375, 0.01324462890625, 0.00021648406982421875, -0.0120849609375, 0.00238037109375, -0.00775146484375, -0.0101318359375, 0.01141357421875, 0.00677490234375, -0.0028686...
[ 262, 46485, 1295, 5303, 23, 159, 38969, 9, 10752, 4867, 502, 9842, 1679, 2967, 4358, 11249, 831, 87, 154109, 4568, 74918, 6620, 111, 483, 89536 ]
[ 0.1527099609375, 0.231689453125, 0.171875, 0.21484375, 0.07452392578125, 0.0943603515625, 0.2381591796875, 0.05181884765625, 0.1480712890625, 0.216064453125, 0.12335205078125, 0.019805908203125, 0.06280517578125, 0.05169677734375, 0.048675537109375, 0.0780029296875, 0.08294677734375,...
embed
40234949_c0
40234949
prolog
0
Title: Prolog remove brackets from string Problem title: Prolog remove brackets from string Tags: brackets, prolog, string Problem: Prolog remove brackets from string How to remove brackets from string in Prolog. I have only {} brackets, and there might be nested brackets. for example if I have a string a{1+{2}+3}b{4}c...
Prolog remove brackets from string Prolog remove brackets from string brackets prolog string string Prolog Prolog remove brackets from string How to remove brackets from string in Prolog. I have only {} brackets, and there might be nested brackets. for example if I have a string then the answer will be string
[ -0.006561279296875, 0.024169921875, -0.004913330078125, 0.00994873046875, 0.006561279296875, 0.01318359375, -0.007415771484375, -0.006134033203125, -0.0003833770751953125, -0.01214599609375, 0.001983642578125, -0.0260009765625, -0.03076171875, -0.01446533203125, 0.021484375, -0.015625,...
[ 1250, 4867, 87388, 1620, 27853, 7, 1295, 79315, 502, 11249, 47, 23, 765, 4734, 8512, 71, 35166 ]
[ 0.1749267578125, 0.2283935546875, 0.1719970703125, 0.2294921875, 0.2462158203125, 0.09375, 0.1146240234375, 0.2447509765625, 0.11712646484375, 0.005588531494140625, 0.005084991455078125, 0.041595458984375, 0.0181884765625, 0.0220489501953125, 0.122314453125, 0.0130767822265625, 0.070...
embed
23834304_c1
23834304
prolog
1
(X),R1 = [X], variablen(Y,R2), append(R2,R1,R). variablen(X*Y,R):- variablen(X,P), variablen(Y,Q), append(P,Q,R). variablen(X/Y, R):- not(number(X)), atomic(X), R1 = [X], variablen(Y,R2), append(R2,R1,R). variablen(Y/X, R):- not(number(X)), atomic(X), R1 = [X], variablen(Y,R2), append(R2,R1,R). variablen(X/Y,R):- varia...
(X),R1 = [X], variablen(Y,R2), append(R2,R1,R). variablen(X*Y,R):- variablen(X,P), variablen(Y,Q), append(P,Q,R). variablen(X/Y, R):- not(number(X)), atomic(X), R1 = [X], variablen(Y,R2), append(R2,R1,R). variablen(Y/X, R):- not(number(X)), atomic(X), R1 = [X], variablen(Y,R2), append(R2,R1,R). variablen(X/Y,R):- varia...
[ 0.0072021484375, 0.01031494140625, 0.00982666015625, 0.019287109375, -0.0157470703125, 0.01239013671875, -0.0021820068359375, -0.004913330078125, 0.01031494140625, -0.004150390625, -0.00628662109375, 0.0084228515625, -0.006011962890625, -0.014404296875, -0.0103759765625, 0.00927734375,...
[ 1542, 247, 1052, 418, 2203, 378, 268, 77336, 19, 1723, 10461, 114689, 71, 304, 194, 1639, 9, 683, 2737, 64, 627, 959, 2606, 1297, 132, 34627, 1771, 28864, 26073, 7, 12, 1193, 4, 990 ]
[ 0.198486328125, 0.07537841796875, 0.172607421875, 0.1551513671875, 0.1746826171875, 0.0198516845703125, 0.05731201171875, 0.260498046875, 0.0985107421875, 0.183837890625, 0.14892578125, 0.1104736328125, 0.060943603515625, 0.084716796875, 0.1142578125, 0.10302734375, 0.091552734375, ...
embed
17170788_c0
17170788
prolog
0
Title: Sort tuples in Prolog Problem title: Sort tuples in Prolog Tags: prolog, sorting Problem: Sort tuples in Prolog When I sort [(101,a),(42,b),(85,b)] is Prolog with sort([(101,a),(42,b),(85,b)],X). is get X = [ (42, b), (85, b), (101, a)]. But how come? Does Prolog recognize the tuples and sort them on the first e...
Sort tuples in Prolog Sort tuples in Prolog prolog sorting Sort Prolog Sort tuples in Prolog When I sort [(101,a),(42,b),(85,b)] is Prolog with sort([(101,a),(42,b),(85,b)],X). is get X = [ (42, b), (85, b), (101, a)]. But how come? Does Prolog recognize the tuples and sort them on the first element and then on the sec...
[ 0.022216796875, 0.006805419921875, 0.012939453125, 0.0126953125, -0.01495361328125, -0.0033721923828125, -0.01324462890625, -0.005645751953125, -0.00823974609375, -0.010498046875, -0.00131988525390625, 0.021484375, -0.0205078125, 0.00640869140625, 0.00848388671875, -0.005035400390625, ...
[ 53666, 370, 99726, 23, 1250, 4867, 502, 12096, 214, 87, 35046, 11, 13023, 275, 12951, 83, 678, 1542, 2046, 1193, 2203, 876, 10, 1380, 125296, 5117, 12830, 17932 ]
[ 0.197509765625, 0.1737060546875, 0.2117919921875, 0.0682373046875, 0.1796875, 0.2401123046875, 0.1263427734375, 0.220703125, 0.0193328857421875, 0.01318359375, 0.1796875, 0.0200042724609375, 0.1822509765625, 0.045654296875, 0.199462890625, 0.01483154296875, 0.0396728515625, 0.09655...
embed
6330972_c0
6330972
prolog
0
Title: YAP initialization file? Problem title: YAP initialization file? Tags: yap, prolog Problem: YAP initialization file? I am wondering if there is an equivalent of the SWI initialization file "~/.plrc" in YAP. I would like to define some directories with: file_search_path/2 before loading YAP, but I do not know whe...
YAP initialization file? YAP initialization file? yap prolog YAP YAP initialization file? I am wondering if there is an equivalent of the SWI initialization file "~/.plrc" in YAP. I would like to define some directories with: file_search_path/2 before loading YAP, but I do not know where to do it. Any help will be high...
[ 0.028076171875, 0.021728515625, 0.0194091796875, 0.0196533203125, -0.013427734375, -0.005279541015625, 0.01361083984375, 0.000720977783203125, -0.0081787109375, -0.006317138671875, 0.006195068359375, 0.006927490234375, -0.034912109375, 0.0020599365234375, 0.010009765625, 0.015625, -0...
[ 128706, 61475, 47691, 11435, 32, 15850, 502, 4867, 149016, 2174, 2685, 83, 142, 183234, 111, 159, 38969, 2306, 64, 5, 2424, 19437, 23, 1884, 61924, 3060, 14364, 3387, 678, 86250, 128405, 12477, 8108, 72367, 214, 1284, 959, 3714, 7440, 54,...
[ 0.3115234375, 0.1978759765625, 0.143798828125, 0.19873046875, 0.054107666015625, 0.254638671875, 0.162353515625, 0.199951171875, 0.0802001953125, 0.0209808349609375, 0.030120849609375, 0.0280609130859375, 0.01512908935546875, 0.1522216796875, 0.03271484375, 0.10247802734375, 0.262207...
embed
21092890_c0
21092890
prolog
0
Title: Generate list in prolog Problem title: Generate list in prolog Tags: prolog Problem: Generate list in prolog I'm try to make a list of the values n,n+1,...2*n-1 for example if I have n=4 ==> [4,5,6,7] I have managed to write this code but it shows the list of first n elements . Can you help me modify it? create(...
Generate list in prolog Generate list in prolog prolog Generate n-1 create_list Generate list in prolog I'm try to make a list of the values n,n+1,...2*n-1 for example if I have n=4 ==> [4,5,6,7] I have managed to write this code but it shows the list of first n elements . Can you help me modify it?
[ 0.0086669921875, 0.000682830810546875, 0.00136566162109375, 0.00160980224609375, 0.000873565673828125, 0.007171630859375, -0.0179443359375, 0.000827789306640625, 0.033935546875, -0.0322265625, -0.006988525390625, -0.030029296875, 0.000701904296875, 0.0091552734375, 0.0177001953125, 0.0...
[ 155370, 67, 5303, 23, 502, 4867, 653, 5759, 28282, 6562, 9790, 3249, 111, 142424, 19, 21748, 304, 1639, 107947, 69112, 80389, 136555, 145755, 33022, 18151, 45831, 70, 5117, 80854, 4358, 2811, 40383 ]
[ 0.1939697265625, 0.06256103515625, 0.2425537109375, 0.03863525390625, 0.1700439453125, 0.237548828125, 0.086181640625, 0.2071533203125, 0.1717529296875, 0.245849609375, 0.0882568359375, 0.08502197265625, 0.001861572265625, 0.1697998046875, 0.0222930908203125, 0.17626953125, 0.0389404...
embed
7961466_c0
7961466
prolog
0
Title: hangman in prolog Problem title: hangman in prolog Tags: string, prolog Problem: hangman in prolog I am a beginner to prolog. How can I convert letters into * (asterisk)? I know that it is a character codes in prolog to represent strings. The problem is if it is a letter, convert it to " *", if it is a underscor...
hangman in prolog hangman in prolog string prolog hangman in prolog I am a beginner to prolog. How can I convert letters into * (asterisk)? I know that it is a character codes in prolog to represent strings. The problem is if it is a letter, convert it to " *", if it is a underscore, just keep it. So how do I know whet...
[ 0.00750732421875, -0.017578125, 0.00872802734375, 0.00494384765625, -0.021484375, 0.0198974609375, -0.002288818359375, 0.0045166015625, 0.00121307373046875, -0.0164794921875, 0.00537109375, -0.027587890625, -0.01055908203125, 0.00518798828125, 0.002685546875, 0.005157470703125, 0.026...
[ 10756, 669, 502, 4867, 23, 79315, 9842, 1679, 11249, 831, 96760, 120820, 3934, 661, 11532, 57786, 62816, 18151, 33636, 2967, 2174, 83, 31330, 442, 47, 1379, 7, 30854, 13695, 54, 3714, 36766, 10, 959 ]
[ 0.213134765625, 0.1827392578125, 0.15234375, 0.2255859375, 0.06268310546875, 0.1783447265625, 0.034912109375, 0.056365966796875, 0.034698486328125, 0.0221710205078125, 0.16650390625, 0.193603515625, 0.110595703125, 0.19970703125, 0.1185302734375, 0.2322998046875, 0.1097412109375, 0...
embed
9510432_c0
9510432
prolog
0
Title: Prolog basic questions Problem title: Prolog basic questions Tags: prolog Problem: Prolog basic questions First, what do you recommend as a book for learning prolog. Second, is there an easy way to load many .pl files at once? Currently just doing one at a time with ['name.pl'] but it is annoying to do over and ...
Prolog basic questions Prolog basic questions prolog Prolog Prolog basic questions First, what do you recommend as a book for learning prolog. Second, is there an easy way to load many .pl files at once? Currently just doing one at a time with ['name.pl'] but it is annoying to do over and over again. I am also using th...
[ 0.0289306640625, 0.00897216796875, -0.0006561279296875, 0.013427734375, -0.019775390625, 0.0191650390625, -0.0045166015625, -0.01214599609375, 0.010009765625, -0.05712890625, 0.0012359619140625, -0.018798828125, -0.0177001953125, 0.0019378662109375, -0.00055694580078125, 0.002975463867...
[ 1250, 4867, 62822, 17582, 502, 67330, 10, 12877, 100, 52080, 77648, 23468, 3917, 72367, 5941, 5, 2424, 102158, 24145, 1632, 1733, 11627, 8668, 38543, 645, 13438, 17368, 903, 30698 ]
[ 0.178466796875, 0.27978515625, 0.1527099609375, 0.1387939453125, 0.1707763671875, 0.076904296875, 0.023345947265625, 0.168212890625, 0.003936767578125, 0.0906982421875, 0.01007080078125, 0.056671142578125, 0.0076904296875, 0.15087890625, 0.08917236328125, 0.04315185546875, 0.20080566...
embed
43452132_c0
43452132
prolog
0
Title: Split the list in two,where the length of first is given Problem title: Split the list in two,where the length of first is given Tags: prolog Problem: Split the list in two,where the length of first is given I want to create a function that we split a list in 2 ,given the length of the first one.I really stuck i...
Split the list in two,where the length of first is given Split the list in two,where the length of first is given prolog Split Split the list in two,where the length of first is given I want to create a function that we split a list in 2 ,given the length of the first one.I really stuck in the beginning of it. Any idea...
[ 0.00616455078125, 0.015625, -0.002471923828125, 0.00921630859375, -0.0299072265625, -0.00982666015625, -0.01513671875, 0.0208740234375, 0.03076171875, -0.0166015625, 0.01361083984375, 0.0030517578125, -0.0084228515625, 0.020751953125, 0.00384521484375, -0.0022735595703125, 0.02648925...
[ 46474, 5303, 23, 6626, 140909, 5117, 34475, 136913, 502, 4867, 70, 111, 3444, 28282, 32354, 642, 65450, 116, 107409, 1632, 6183, 179933, 86595, 25647 ]
[ 0.2327880859375, 0.2344970703125, 0.1470947265625, 0.1898193359375, 0.137451171875, 0.118896484375, 0.06219482421875, 0.038848876953125, 0.1298828125, 0.174560546875, 0.07623291015625, 0.00823974609375, 0.0830078125, 0.1024169921875, 0.1949462890625, 0.00048828125, 0.2293701171875, ...
embed
16261203_c0
16261203
prolog
0
Title: Reversing facts in prolog and display them Problem title: Reversing facts in prolog and display them Tags: fact, prolog Problem: Reversing facts in prolog and display them If I have the following: friends(tim,joe). if i go: ?- friends(X,Y). I would get: X=tim Y=joe What would I have to print the following with o...
Reversing facts in prolog and display them Reversing facts in prolog and display them fact prolog Reversing Reversing facts in prolog and display them If I have the following: if i go: I would get: What would I have to print the following with out adding any new facts
[ 0.032958984375, 0.00323486328125, 0.00185394287109375, 0.02392578125, -0.0040283203125, -0.00677490234375, 0.0101318359375, 0.01483154296875, -0.003997802734375, -0.0167236328125, -0.00732421875, -0.000667572021484375, -0.026123046875, 0.0084228515625, 0.0029144287109375, 0.01214599609...
[ 853, 7864, 214, 15824, 7, 502, 4867, 44116, 23, 136, 765, 25632, 2174, 738, 2806, 2046, 4865, 47, 28412, 678, 1810, 154107, 3525 ]
[ 0.1043701171875, 0.2093505859375, 0.06475830078125, 0.1865234375, 0.07904052734375, 0.140625, 0.2156982421875, 0.153076171875, 0.007068634033203125, 0.002025604248046875, 0.0386962890625, 0.11248779296875, 0.057159423828125, 0.113525390625, 0.05133056640625, 0.07562255859375, 0.02024...
embed
31062807_c0
31062807
prolog
0
Title: Error Undefined Procedure in Prolog Problem title: Error Undefined Procedure in Prolog Tags: prolog Problem: Error Undefined Procedure in Prolog I wrote a rule: parent(georgie,jessy) :- child(jessy,georgio). but, when I want to prove ?- parent(georgie,jessy). I get an error: parent/2: Undefined procedure: child/...
Error Undefined Procedure in Prolog Error Undefined Procedure in Prolog prolog Error Undefined Procedure Prolog Error Undefined Procedure in Prolog I wrote a rule: but, when I want to prove I get an error: Please help. Thanks.
[ 0.020263671875, 0.0250244140625, -0.003936767578125, 0.005157470703125, -0.02197265625, 0.021240234375, -0.0020904541015625, 0.005889892578125, -0.01190185546875, -0.029052734375, -0.005645751953125, -0.01416015625, -0.002410888671875, 0.01806640625, 0.0185546875, 0.00138092041015625, ...
[ 212059, 79912, 5983, 297, 170470, 23, 1250, 4867, 502, 13, 54397, 79986, 1284, 3229, 3444, 47, 23534, 87, 2046, 18499, 30607, 4358 ]
[ 0.197998046875, 0.130859375, 0.1947021484375, 0.04119873046875, 0.2056884765625, 0.05047607421875, 0.165771484375, 0.242919921875, 0.11871337890625, 0.0065765380859375, 0.098388671875, 0.15283203125, 0.048309326171875, 0.0179595947265625, 0.04595947265625, 0.005279541015625, 0.171142...
embed
9004265_c0
9004265
prolog
0
Title: Inserting X in its correct position in a sorted list Problem title: Inserting X in its correct position in a sorted list Tags: prolog Problem: Inserting X in its correct position in a sorted list In prolog how do I insert X in its correct position in a sorted list? My Attempt: insert(X,[Y|Rest],[X,Y|Rest]):- X @...
Inserting X in its correct position in a sorted list Inserting X in its correct position in a sorted list prolog Inserting Rest BiggerRest Inserting X in its correct position in a sorted list In prolog how do I insert X in its correct position in a sorted list? My Attempt:
[ -0.0120849609375, -0.006256103515625, 0.027587890625, -0.0004177093505859375, -0.00970458984375, 0.033935546875, -0.0172119140625, -0.028564453125, 0.00830078125, -0.0028533935546875, 0.041259765625, -0.00286865234375, -0.015625, -0.01171875, 0.001556396484375, 0.020263671875, 0.0061...
[ 360, 2189, 1916, 1193, 23, 6863, 26785, 19069, 17497, 71, 5303, 502, 4867, 49756, 175737, 56, 1052, 525, 3642, 54, 87, 183540, 10, 34224 ]
[ 0.09832763671875, 0.1826171875, 0.0631103515625, 0.2313232421875, 0.1463623046875, 0.10498046875, 0.2105712890625, 0.21435546875, 0.208740234375, 0.10498046875, 0.2386474609375, 0.139404296875, 0.2159423828125, 0.1453857421875, 0.061187744140625, 0.042022705078125, 0.0408935546875, ...
embed
50668708_c0
50668708
prolog
0
Title: What does the % symbol mean in Prolog? Problem title: What does the % symbol mean in Prolog? Tags: prolog Problem: What does the % symbol mean in Prolog? i think this % symbol is just comment in prolog.I am not sure about it.Could you tell me if i am right?Example,i have seen this symbol like this %path(X,Y,[X,Y...
What does the % symbol mean in Prolog? What does the % symbol mean in Prolog? prolog What Prolog next_to What does the % symbol mean in Prolog? i think this % symbol is just comment in prolog.I am not sure about it.Could you tell me if i am right?Example,i have seen this symbol like this there are comments?
[ 0.00469970703125, 0.005950927734375, 0.00799560546875, 0.0196533203125, -0.0250244140625, 0.0255126953125, 0, 0.0057373046875, 0.00860595703125, -0.037109375, -0.00653076171875, -0.0103759765625, 0.0174560546875, -0.0208740234375, -0.0146484375, 0.0284423828125, 0.00156402587890625, ...
[ 4865, 14602, 70, 1745, 26582, 29459, 23, 1250, 4867, 502, 11737, 188, 903, 6868, 51592, 24626 ]
[ 0.023284912109375, 0.01467132568359375, 0.020751953125, 0.260986328125, 0.216064453125, 0.10052490234375, 0.061767578125, 0.1513671875, 0.2196044921875, 0.1046142578125, 0.056915283203125, 0.0268402099609375, 0.010223388671875, 0.162109375, 0.007236480712890625, 0.10992431640625 ]
embed
11529022_c0
11529022
prolog
0
Title: Creating list from predicate Problem title: Creating list from predicate Tags: prolog Problem: Creating list from predicate I have a predicate as: delta(q1,a,q2). delta(q1,b,q3). delta(q2,a,q4). delta(q2,a,q3). delta(q3,a,q1). and I want to convert them to list like this: nfatodfa([(q1,a,q2),(q1,b,q3),(q2,a,q4),...
Creating list from predicate Creating list from predicate prolog predicate Creating Creating list from predicate I have a predicate as: and I want to convert them to list like this: nfatodfa([(q1,a,q2),(q1,b,q3),(q2,a,q4),(q2,a,q3),(q3,a,q1)],L) How can I do that?
[ 0.0257568359375, -0.00213623046875, -0.005218505859375, -0.00191497802734375, -0.0169677734375, 0.0172119140625, 0.00555419921875, 0.0103759765625, 0.005615234375, -0.042724609375, 0.0034942626953125, -0.023681640625, 0.000885009765625, -0.00113677978515625, -0.0162353515625, 0.0117797...
[ 56781, 5303, 1295, 1653, 2063, 67, 1916, 502, 4867, 765, 237, 12, 3444, 47, 96760, 2856, 1884, 903, 653, 7834, 2199, 1021, 864, 418, 11, 10461, 275, 21320, 304, 29557, 363, 17727, 866, 831, 54 ]
[ 0.172119140625, 0.2462158203125, 0.1202392578125, 0.1844482421875, 0.2261962890625, 0.1295166015625, 0.03363037109375, 0.10467529296875, 0.2103271484375, 0.037567138671875, 0.08935546875, 0.014617919921875, 0.1165771484375, 0.0904541015625, 0.171630859375, 0.0411376953125, 0.06945800...
embed
61236848_c1
61236848
prolog
1
< El, junta_novo_aleatorio(L,INF,SUP,L2), AC_num is AC +1, n_aleatorios(El,INF,SUP,L2,AC_num). My output: ?- n_aleatorios(3, 1, 5, Lst). true ; false. Expected output (for example): ?- n_aleatorios(3, 1, 5, Lst). Lst = [2,3,5] Really any help would be appreciated. Code signals: Checks, nao_membro, Joins, insere_ordenad...
< El, junta_novo_aleatorio(L,INF,SUP,L2), AC_num is AC +1, n_aleatorios(El,INF,SUP,L2,AC_num). My output: ?- n_aleatorios(3, 1, 5, Lst). true ; false. Expected output (for example): ?- n_aleatorios(3, 1, 5, Lst). Lst = [2,3,5] Really any help would be appreciated. Code signals: Checks, nao_membro, Joins, insere_ordenad...
[ -0.013916015625, 0.00072479248046875, 0.0185546875, 0.000804901123046875, 0.00177001953125, 0.033935546875, -0.000583648681640625, 0.0059814453125, 0.0003299713134765625, -0.0167236328125, 0.01025390625, 0.000331878662109375, 0.00439453125, 0.01318359375, 0.01177978515625, -0.006683349...
[ 4426, 540, 89266, 46254, 1935, 11, 20179, 866, 8852, 919, 18409, 10461, 12944, 2606, 83, 57157, 653, 13300, 232, 7623, 304, 15012, 194, 2646, 140992, 705, 9, 86827, 106, 190, 339, 271, 29568, 98320, 60075, 13, 89829, 15, 27781, 4, 92714...
[ 0.030487060546875, 0.1611328125, 0.2135009765625, 0.13720703125, 0.2042236328125, 0.09967041015625, 0.1849365234375, 0.06793212890625, 0.04571533203125, 0.1204833984375, 0.1610107421875, 0.125, 0.125, 0.207763671875, 0.0284881591796875, 0.1309814453125, 0.118408203125, 0.1842041015...
embed
65373918_c0
65373918
prolog
0
Title: I have a problem of maplist of prolog program Problem title: I have a problem of maplist of prolog program Tags: prolog Problem: I have a problem of maplist of prolog program hallo this is my Programm of Prolog mymaplist(_,[]). mymaplist(P,[X|Xs]) :- call(P,X), mymaplist(P,Xs). even(X) :- X mod 2 =:= 0. my probl...
I have a problem of maplist of prolog program I have a problem of maplist of prolog program prolog I have a problem of maplist of prolog program hallo this is my Programm of Prolog my problem is could I use (=..)/2 not use call function? and how should I do. thanks
[ -0.00390625, 0.002105712890625, 0.0224609375, 0.00439453125, -0.0267333984375, 0.033203125, 0.0203857421875, 0.00897216796875, -0.00005507469177246094, -0.05029296875, 0.01123046875, 0.004486083984375, -0.01611328125, 0.00836181640625, 0.0115966796875, -0.0108642578125, 0.01940917968...
[ 87, 765, 10, 2967, 22288, 6562, 111, 502, 4867, 1528, 23664, 27958, 1250, 5809, 4527, 78690, 5, 12477, 959, 11782, 32354, 5608, 54 ]
[ 0.037841796875, 0.09600830078125, 0.030609130859375, 0.1798095703125, 0.15673828125, 0.231689453125, 0.059417724609375, 0.1319580078125, 0.249267578125, 0.146728515625, 0.043975830078125, 0.14404296875, 0.145263671875, 0.087646484375, 0.1275634765625, 0.1571044921875, 0.11865234375, ...
embed
48176401_c0
48176401
prolog
0
Title: Implementing greater-than sudoku solver in Prolog Problem title: Implementing greater-than sudoku solver in Prolog Tags: prolog, clpfd Problem: Implementing greater-than sudoku solver in Prolog How to implement greater-than sudoku solver in Prolog using clpfd? I have trouble figuring out how to add those greater...
Implementing greater-than sudoku solver in Prolog Implementing greater-than sudoku solver in Prolog prolog clpfd Implementing Prolog Implementing greater-than sudoku solver in Prolog How to implement greater-than sudoku solver in Prolog using clpfd? I have trouble figuring out how to add those greater-than constraints ...
[ 0.0213623046875, 0.0252685546875, 0.01263427734375, -0.0084228515625, -0.01251220703125, 0.0030059814453125, -0.00035858154296875, -0.005584716796875, -0.016357421875, -0.017822265625, -0.00799560546875, -0.01385498046875, -0.0126953125, -0.004486083984375, 0.01397705078125, 0.00546264...
[ 153941, 214, 117396, 21732, 8932, 38067, 3115, 814, 23, 1250, 4867, 502, 33139, 39557, 71, 47, 29479, 17368, 63134, 26747, 15190, 8382, 158, 2816, 4288, 20324 ]
[ 0.1693115234375, 0.00885009765625, 0.161865234375, 0.1881103515625, 0.1435546875, 0.2181396484375, 0.155517578125, 0.18310546875, 0.070556640625, 0.154541015625, 0.24755859375, 0.10015869140625, 0.0975341796875, 0.1435546875, 0.1942138671875, 0.0186309814453125, 0.2164306640625, 0....
embed
31098146_c0
31098146
prolog
0
Title: Moving to previous query in XSB or Ciao (Prolog) Problem title: Moving to previous query in XSB or Ciao (Prolog) Tags: prolog-toplevel, prolog Problem: Moving to previous query in XSB or Ciao (Prolog) While using swi-prolog, one can recall previous query using the UP arrow key (at the terminal). How can this be ...
Moving to previous query in XSB or Ciao (Prolog) Moving to previous query in XSB or Ciao (Prolog) prolog-toplevel prolog Moving XSB Ciao Prolog Moving to previous query in XSB or Ciao (Prolog) While using swi-prolog, one can recall previous query using the UP arrow key (at the terminal). How can this be achieved in XSB...
[ 0.002197265625, 0.044189453125, 0.0130615234375, 0.037841796875, -0.0087890625, -0.005889892578125, 0.0084228515625, 0.007598876953125, 0.01177978515625, -0.04248046875, 0.0030059814453125, 0.000640869140625, 0.00188446044921875, 0.008544921875, 0.0027313232421875, 0.003143310546875, ...
[ 2501, 6496, 47, 96362, 41, 1294, 23, 1193, 36474, 707, 107786, 10752, 4867, 502, 13784, 67919, 1250, 17368, 91, 2452, 3454, 831, 189232, 70, 27560, 118201, 22799, 33949, 69307, 76519 ]
[ 0.1602783203125, 0.1103515625, 0.204345703125, 0.1998291015625, 0.1761474609375, 0.14501953125, 0.048248291015625, 0.0943603515625, 0.2093505859375, 0.0218048095703125, 0.237060546875, 0.1104736328125, 0.225341796875, 0.10888671875, 0.039520263671875, 0.1416015625, 0.126708984375, ...
embed
64018112_c0
64018112
prolog
0
Title: Palindrome in base 4 Problem title: Palindrome in base 4 Tags: palindrome, prolog Problem: Palindrome in base 4 This code should check if a given number is palindrome in base 4. If given number is palindrome, solution is true , but if not, then that is error. baza_4(0,[]). splitR(N,Xs) :- baza_4(N,Ys), reverse(X...
Palindrome in base 4 Palindrome in base 4 palindrome prolog Palindrome baza_4 Palindrome in base 4 This code should check if a given number is palindrome in base 4. If given number is palindrome, solution is true , but if not, then that is error.
[ 0.00140380859375, -0.01019287109375, 0.005706787109375, -0.00469970703125, -0.0162353515625, 0.031005859375, -0.00848388671875, -0.002349853515625, 0.014404296875, -0.01116943359375, 0.0084228515625, 0.01611328125, -0.00160980224609375, -0.0050048828125, 0.0024261474609375, 0.005828857...
[ 12530, 73, 102851, 23, 3647, 201, 17923, 19, 502, 4867, 12170, 617, 3293, 18151, 5608, 12765, 2174, 34475, 14012, 83, 1398, 4263, 29806, 29568, 4, 959, 450, 18499 ]
[ 0.183837890625, 0.1461181640625, 0.273193359375, 0.126953125, 0.2357177734375, 0.237548828125, 0.20556640625, 0.14453125, 0.07501220703125, 0.14111328125, 0.1796875, 0.1761474609375, 0.041107177734375, 0.2125244140625, 0.089111328125, 0.200439453125, 0.10589599609375, 0.09405517578...
embed
27086074_c0
27086074
prolog
0
Title: Accessing a particular element in a list Problem title: Accessing a particular element in a list Tags: prolog Problem: Accessing a particular element in a list I am new to Prolog and wanted to access specific elements of the list.For eg- L=[name,age,height,weight,gender] How can I access age and height from this...
Accessing a particular element in a list Accessing a particular element in a list prolog Accessing Accessing a particular element in a list I am new to Prolog and wanted to access specific elements of the list.For eg- How can I access age and height from this list as I want to compare them with some given values???
[ 0.010009765625, -0.006988525390625, -0.00799560546875, 0.01019287109375, -0.00007200241088867188, 0.00885009765625, -0.006622314453125, 0.01129150390625, 0.01031494140625, -0.0013885498046875, 0.01470947265625, -0.0111083984375, -0.007598876953125, -0.009033203125, -0.006439208984375, ...
[ 40266, 214, 17311, 12830, 23, 5303, 502, 4867, 3525, 1250, 36663, 47, 17203, 29458, 80854, 11249, 831, 32070, 136, 155955, 1295, 3444, 69101, 142424, 7273 ]
[ 0.208251953125, 0.0821533203125, 0.172119140625, 0.17236328125, 0.04840087890625, 0.18701171875, 0.140869140625, 0.2232666015625, 0.06414794921875, 0.15234375, 0.058990478515625, 0.002490997314453125, 0.179443359375, 0.1514892578125, 0.1456298828125, 0.01488494873046875, 0.0304718017...
embed
50193969_c0
50193969
prolog
0
Title: How to convert an input from L to [H|T] in prolog? Problem title: How to convert an input from L to [H|T] in prolog? Tags: prolog Problem: How to convert an input from L to [H|T] in prolog? say if I have to create a function in prolog: dosomething(L). how can I make it into something that does the same thing as:...
How to convert an input from L to [H|T] in prolog? How to convert an input from L to [H|T] in prolog? prolog L How How to convert an input from L to [H|T] in prolog? say if I have to create a function in prolog: dosomething(L). how can I make it into something that does the same thing as: dosomething([H|T]) where L = [...
[ -0.00909423828125, 0.020751953125, 0.00555419921875, -0.009033203125, -0.0179443359375, 0.00011730194091796875, -0.006134033203125, -0.0033416748046875, 0.0012054443359375, -0.0439453125, 0.00872802734375, -0.00860595703125, -0.0224609375, 0.0228271484375, -0.01068115234375, -0.0173339...
[ 11249, 47, 96760, 107730, 1295, 339, 841, 58745, 618, 23, 502, 4867, 28282, 32354, 54, 43452, 64113, 866, 3249, 3934, 14602, 5701, 13580, 65450, 5303 ]
[ 0.06475830078125, 0.09075927734375, 0.1566162109375, 0.220703125, 0.07318115234375, 0.15234375, 0.1285400390625, 0.09271240234375, 0.1414794921875, 0.029083251953125, 0.1470947265625, 0.2322998046875, 0.09228515625, 0.1402587890625, 0.0911865234375, 0.03118896484375, 0.1171875, 0.1...
embed
71886866_c1
71886866
prolog
1
:- public(test/3). test(Size, Value, Info) :- functor(A, s, Size), forall( arg(Arg, A, _), nb_setarg(Arg, A, Value) ), _Array_ = a(Info,A). ?- ary(A)::test(5,0). A = a(i(5), s(0, 0, 0, 0, 0)). Code signals: Objectifying, Array, Term, ary1d_new, Size, Sym, ArySym, Ary, nb_setarg, ary1d_get, Pos, Val, ary1d_set, new1d, ...
:- public(test/3). test(Size, Value, Info) :- functor(A, s, Size), forall( arg(Arg, A, _), nb_setarg(Arg, A, Value) ), _Array_ = a(Info,A). ?- ary(A)::test(5,0). A = a(i(5), s(0, 0, 0, 0, 0)). Code signals: Objectifying, Array, Term, ary1d_new, Size, Sym, ArySym, Ary, nb_setarg, ary1d_get, Pos, Val, ary1d_set, new1d, ...
[ -0.0022430419921875, -0.0128173828125, 0.0014190673828125, 0.004119873046875, 0.000171661376953125, -0.0224609375, -0.01422119140625, 0.0245361328125, 0.021484375, 0.032958984375, 0.0162353515625, 0.03466796875, -0.0225830078125, -0.007476806640625, 0.00909423828125, -0.003448486328125...
[ 15772, 3835, 6954, 18113, 194, 3034, 127167, 13, 190060, 14048, 7477, 18770, 284, 91, 80378, 100, 5584, 79459, 7614, 177, 62, 247, 653, 275, 3509, 61477, 7092, 10, 93147, 11496, 104116, 77495, 2203, 14, 124534, 2389, 757, 28864, 26073, 7,...
[ 0.0791015625, 0.15869140625, 0.2398681640625, 0.25537109375, 0.01177978515625, 0.250732421875, 0.172607421875, 0.053863525390625, 0.2310791015625, 0.2193603515625, 0.158203125, 0.1795654296875, 0.0906982421875, 0.1109619140625, 0.1650390625, 0.04345703125, 0.14404296875, 0.12255859...
embed
45122161_c0
45122161
prolog
0
Title: Why does p =\= &#x27;p&#x27; return an error in SWI-prolog? Problem title: Why does p =\= &#x27;p&#x27; return an error in SWI-prolog? Tags: prolog Problem: Why does p =\= 'p' return an error in SWI-prolog? I have question with single quote atom. While p == 'p' returns true, why is p =\= 'p' not returning false?...
Why does p =\= &#x27;p&#x27; return an error in SWI-prolog? Why does p =\= &#x27;p&#x27; return an error in SWI-prolog? prolog Why SWI-prolog Why does p =\= 'p' return an error in SWI-prolog? I have question with single quote atom. While p == 'p' returns true, why is p =\= 'p' not returning false? it gives me an error ...
[ 0.0106201171875, 0.0093994140625, 0.01055908203125, 0.00408935546875, -0.0002460479736328125, 0.0021209716796875, 0.006439208984375, -0.0244140625, -0.014404296875, -0.00482177734375, 0.00830078125, -0.0166015625, 0.0179443359375, -0.0012664794921875, -0.0078125, -0.003326416015625, ...
[ 44084, 14602, 915, 2203, 41872, 1369, 3768, 254, 30646, 18499, 159, 38969, 9, 3454, 4867, 142, 502, 23, 9655, 11001, 66747, 34627, 51404, 69112, 29568, 15400, 83, 959, 98320, 76199, 163, 54433, 10, 32354 ]
[ 0.1505126953125, 0.04071044921875, 0.2161865234375, 0.162841796875, 0.07684326171875, 0.1558837890625, 0.1412353515625, 0.21875, 0.208251953125, 0.23095703125, 0.106201171875, 0.24169921875, 0.058013916015625, 0.1666259765625, 0.216552734375, 0.049530029296875, 0.1031494140625, 0.0...
embed
70136252_c0
70136252
prolog
0
Title: Subroutines as parameters in Prolog Problem title: Subroutines as parameters in Prolog Tags: prolog Problem: Subroutines as parameters in Prolog in:- male(jack), female(rose). test(in):- male(X) -> write("True"), female(X) -> write("True"). I'm testing whether it's possible to pass subroutines as parameters. But...
Subroutines as parameters in Prolog Subroutines as parameters in Prolog prolog Subroutines Prolog Subroutines as parameters in Prolog I'm testing whether it's possible to pass subroutines as parameters. But I'm having errors when calling test(in). in SWI
[ 0.01324462890625, 0.0208740234375, 0.004852294921875, 0.004486083984375, -0.0174560546875, 0.01458740234375, -0.006683349609375, 0.00390625, -0.00933837890625, -0.0205078125, -0.007598876953125, 0.009521484375, -0.0294189453125, 0.022705078125, 0.0322265625, 0.00018787384033203125, 0...
[ 8273, 14179, 10325, 7, 237, 171859, 1250, 4867, 502, 23, 134234, 7722, 27875, 1614, 18499, 159029, 3034, 73, 159, 38969 ]
[ 0.2086181640625, 0.1865234375, 0.2021484375, 0.0662841796875, 0.0916748046875, 0.2117919921875, 0.15087890625, 0.223876953125, 0.10687255859375, 0.004642486572265625, 0.08172607421875, 0.046539306640625, 0.07818603515625, 0.1962890625, 0.138427734375, 0.08001708984375, 0.194946289062...
embed
44398362_c0
44398362
prolog
0
Title: PySwip read(X) function on python Problem title: PySwip read(X) function on python Tags: prolog, ffi, swi-prolog, python Problem: PySwip read(X) function on python when i put this in python from pyswip import * read = Functor("read",1) X=Variable() call(read(X)) the response is a prolog shell |: how to make a ra...
PySwip read(X) function on python PySwip read(X) function on python prolog ffi swi-prolog python pyswip Functor Variable PySwip read(X) function on python when i put this in python the response is a prolog shell how to make a raw_input instead of the prolog shell? Thanks
[ 0.0009918212890625, 0.01190185546875, 0.0009307861328125, 0.0252685546875, -0.01031494140625, 0.0185546875, 0.0302734375, -0.018310546875, 0.00098419189453125, -0.0556640625, 0.0225830078125, -0.017822265625, -0.035400390625, -0.015625, 0.01068115234375, -0.03369140625, 0.01428222656...
[ 27512, 294, 2452, 254, 12301, 1542, 32354, 98, 17198, 50828, 132, 502, 4867, 24500, 3454, 57756, 28670, 18770, 84572, 3884, 903, 23, 57553, 128019, 3642, 3249, 10, 49649, 454, 73, 7077, 64457, 111 ]
[ 0.178466796875, 0.079345703125, 0.2357177734375, 0.1744384765625, 0.261474609375, 0.1744384765625, 0.160400390625, 0.057525634765625, 0.10595703125, 0.1600341796875, 0.0141754150390625, 0.1337890625, 0.21337890625, 0.1153564453125, 0.10406494140625, 0.10272216796875, 0.07177734375, ...
embed
25492601_c0
25492601
prolog
0
Title: Inequality solving in prolog Problem title: Inequality solving in prolog Tags: swi-prolog, prolog, clpfd Problem: Inequality solving in prolog I am trying to solve ax^2+bx+c>0 type inequality question using prolog. Can i use this coding for solving the problem. two :-use_module(library(fd)). compute(L=R, X) :- t...
Inequality solving in prolog Inequality solving in prolog swi-prolog prolog clpfd Inequality use_module term_variables Inequality solving in prolog I am trying to solve ax^2+bx+c>0 type inequality question using prolog. Can i use this coding for solving the problem. two
[ 0.0140380859375, 0.005859375, 0.0076904296875, 0.03125, -0.0027618408203125, 0.024658203125, 0.01031494140625, 0.0172119140625, 0.00628662109375, -0.0283203125, 0.01104736328125, 0.0032958984375, -0.002288818359375, 0.028564453125, 0.020263671875, -0.0030364990234375, -0.003250122070...
[ 360, 13, 161789, 3115, 6496, 23, 502, 4867, 2452, 3454, 39557, 71, 4527, 83279, 13579, 21690, 19736, 31577, 86869, 425, 8353, 304, 1328, 238, 2740, 2389, 10644, 9655, 17368, 4171, 17, 903, 552, 6238, 2967, 6626 ]
[ 0.092041015625, 0.141845703125, 0.220947265625, 0.09210205078125, 0.0650634765625, 0.08319091796875, 0.154541015625, 0.2376708984375, 0.1075439453125, 0.110595703125, 0.025146484375, 0.0631103515625, 0.0723876953125, 0.09423828125, 0.134033203125, 0.10064697265625, 0.007171630859375,...
embed
16311855_c0
16311855
prolog
0
Title: Prolog specific element of searched sublist Problem title: Prolog specific element of searched sublist Tags: prolog Problem: Prolog specific element of searched sublist Ok, i have a list of the form : myprg(X). X = [[a,b,c],[d,e,f],[g,h,i],[j,k,l]]. that is sublists within a list. I want to display LAST element ...
Prolog specific element of searched sublist Prolog specific element of searched sublist prolog Prolog Prolog specific element of searched sublist Ok, i have a list of the form : myprg(X). X = [[a,b,c],[d,e,f],[g,h,i],[j,k,l]]. that is sublists within a list. I want to display LAST element in the sublist that has "g" as...
[ 0.016357421875, 0.00885009765625, 0.0078125, -0.006439208984375, -0.014404296875, 0.0361328125, 0.007080078125, 0.0205078125, 0.0103759765625, -0.00946044921875, 0.005615234375, -0.028564453125, -0.0234375, -0.00970458984375, -0.0126953125, 0.00128173828125, 0.026611328125, 0.00695...
[ 1250, 4867, 29458, 12830, 33938, 297, 1614, 6562, 502, 111, 9972, 765, 5303, 3173, 759, 10287, 177, 1542, 1193, 2203, 11, 275, 238, 71, 420, 127, 14, 170, 92, 141, 7, 28032, 3444, 47, 44116, 172905, 23, 1556, 237, 5117, 130373 ]
[ 0.173828125, 0.2479248046875, 0.17724609375, 0.2091064453125, 0.1942138671875, 0.0809326171875, 0.2315673828125, 0.2305908203125, 0.1151123046875, 0.007354736328125, 0.006927490234375, 0.005523681640625, 0.1759033203125, 0.10595703125, 0.10443115234375, 0.1314697265625, 0.17602539062...
embed
20889741_c1
20889741
prolog
1
% otherwise... P > 0 , % - when P > 0 P1 is P-1 , % - decrement P remove_at(Xs,P1,N,Ys). % - recurse down , adding the head of the source list to the result list remove_at( [X|Xs] , 0 , N , Ys ) :- % otherwise... N > 0 , % - when N is > 0 N1 is N-1 , % - decrement N remove_at( Xs , 0 , N1 , Ys ). % recurse down, disca...
% otherwise... P > 0 , % - when P > 0 P1 is P-1 , % - decrement P remove_at(Xs,P1,N,Ys). % - recurse down , adding the head of the source list to the result list remove_at( [X|Xs] , 0 , N , Ys ) :- % otherwise... N > 0 , % - when N is > 0 N1 is N-1 , % - decrement N remove_at( Xs , 0 , N1 , Ys ). % recurse down, disca...
[ -0.0024261474609375, 0.01116943359375, 0.0067138671875, 0.004486083984375, -0.020751953125, 0.012939453125, -0.00063323974609375, -0.00008440017700195312, 0.0169677734375, -0.02001953125, 0.02685546875, -0.00970458984375, -0.00640869140625, -0.0107421875, 0.0152587890625, -0.0019836425...
[ 1745, 120262, 27, 436, 977, 757, 20, 3229, 418, 83, 5759, 8, 7612, 674, 87388, 454, 257, 1542, 683, 839, 1723, 195625, 13, 7565, 154107, 70, 10336, 31344, 5303, 16750, 58745, 541, 990, 7, 1193, 45, 39719, 6238, 5, 28864, 26073, 12, ...
[ 0.1796875, 0.194091796875, 0.0394287109375, 0.1475830078125, 0.1009521484375, 0.15283203125, 0.049468994140625, 0.039398193359375, 0.09686279296875, 0.051666259765625, 0.17822265625, 0.164794921875, 0.20263671875, 0.12744140625, 0.249755859375, 0.0256500244140625, 0.1689453125, 0.0...
embed
4089969_c0
4089969
prolog
0
Title: prolog printing lists Problem title: prolog printing lists Tags: prolog, ascii Problem: prolog printing lists ?-mod5(X,[a,16,b,c(5),[[12]],8]). X = [a,1,b,c(5),[[12]],3]. A non-integer should remain untouched. However, in the case of [[12]], since 12 is the ASCII value of "\f" (form feed), it outputs [["\f"]] wh...
prolog printing lists prolog printing lists prolog ascii mod5 prolog printing lists A non-integer should remain untouched. However, in the case of [[12]], since 12 is the ASCII value of "\f" (form feed), it outputs [["\f"]] when what I want it to output [[12]] as is. How can I prevent this?
[ -0.002593994140625, 0.006439208984375, 0.0186767578125, 0.006927490234375, -0.00445556640625, 0.01611328125, 0.0078125, 0.00726318359375, 0.01611328125, 0.0205078125, 0.01434326171875, -0.031982421875, 0.01177978515625, 0.009033203125, -0.01287841796875, -0.006378173828125, 0.0168457...
[ 502, 4867, 2448, 5303, 237, 26506, 2811, 758, 351, 6191, 1505, 5608, 47143, 51, 185188, 297, 33306, 23, 7225, 77284, 16792, 427, 83, 125429, 10001, 34292, 41872, 420, 5037, 61590, 140992, 58, 3229, 2367, 3444, 56282 ]
[ 0.1241455078125, 0.2098388671875, 0.10247802734375, 0.1600341796875, 0.113037109375, 0.1702880859375, 0.129638671875, 0.1553955078125, 0.1527099609375, 0.143310546875, 0.1617431640625, 0.07354736328125, 0.146240234375, 0.08673095703125, 0.1868896484375, 0.0885009765625, 0.01860046386...
embed
33296389_c1
33296389
prolog
1
1), | add_grade(T1, name_grade(tom, 90), T2), | get_grade(T2, tom, Grade). ?- add_grade([], name_grade(tom, 90), T1), | add_grade(T1, name_grade(tom, 85), T2), | get_grade(T2, tom, Grade). ?- add_grade([], name_grade(tom, 90), T1), | add_grade(T1, name_grade(bill, 85), T2), | get_grade(T2, ann, G). false. Code signals:...
1), | add_grade(T1, name_grade(tom, 90), T2), | get_grade(T2, tom, Grade). ?- add_grade([], name_grade(tom, 90), T1), | add_grade(T1, name_grade(tom, 85), T2), | get_grade(T2, tom, Grade). ?- add_grade([], name_grade(tom, 90), T1), | add_grade(T1, name_grade(bill, 85), T2), | get_grade(T2, ann, G). false. Code signals:...
[ 0.0191650390625, 0.021728515625, -0.00567626953125, 0.006805419921875, -0.003021240234375, -0.004852294921875, -0.0267333984375, -0.01007080078125, 0.000400543212890625, 0.0084228515625, 0.03564453125, 0.0103759765625, -0.00921630859375, 0.0184326171875, -0.0201416015625, -0.0241699218...
[ 4879, 4, 58745, 15190, 454, 44286, 618, 418, 9351, 5928, 2510, 247, 384, 10461, 2046, 304, 3627, 22453, 13, 705, 9, 17727, 9365, 2721, 3398, 527, 98320, 28864, 26073, 12, 11249, 15757, 62731, 37878, 112, 1511 ]
[ 0.1171875, 0.038421630859375, 0.068603515625, 0.2049560546875, 0.03717041015625, 0.262451171875, 0.1058349609375, 0.0960693359375, 0.1529541015625, 0.1524658203125, 0.208740234375, 0.057159423828125, 0.1005859375, 0.1444091796875, 0.1136474609375, 0.112548828125, 0.1673583984375, 0...
embed
64692632_c0
64692632
prolog
0
Title: Deleting the middle element of a list Problem title: Deleting the middle element of a list Tags: prolog, list Problem: Deleting the middle element of a list I want to write a Prolog program to delete the middle element from an odd-numbered list into another list. For example, If we give : delete_mid([1,2,3,4,5],...
Deleting the middle element of a list Deleting the middle element of a list prolog list Deleting delete_mid Deleting the middle element of a list I want to write a Prolog program to delete the middle element from an odd-numbered list into another list. For example, If we give : delete_mid([1,2,3,4,5],L) then it will pr...
[ -0.001708984375, 0.01458740234375, 0.0218505859375, -0.006195068359375, 0.0140380859375, 0.00921630859375, -0.00408935546875, -0.004791259765625, 0.0267333984375, -0.0166015625, 0.01458740234375, 0.0001087188720703125, 0.00154876708984375, -0.0091552734375, 0.0022125244140625, -0.01306...
[ 262, 133, 1916, 86991, 12830, 111, 5303, 70, 502, 4867, 154109, 454, 22000, 3444, 33022, 1250, 1528, 1295, 70270, 2606, 1297, 3934, 15700, 27781, 8337, 133063, 363, 80389, 866, 27489, 339, 2203, 35166 ]
[ 0.05999755859375, 0.1510009765625, 0.06927490234375, 0.2398681640625, 0.20263671875, 0.059783935546875, 0.194580078125, 0.0345458984375, 0.109130859375, 0.18115234375, 0.2208251953125, 0.024658203125, 0.255615234375, 0.06146240234375, 0.0662841796875, 0.10400390625, 0.1273193359375, ...
embed
19827675_c2
19827675
prolog
2
? 3 2 Fail: run(1) ? 1 1 Fail: run(0) ? no What are all those Fails after the write? is it still backtracing to previous answers? Is this behaviour the reason why cut is failing in my first code? Please enlighten me. Code signals: Prolog, Cut, Not, Working, FAIL, TABULEIRO, VALUE, LINE, COLUMN, HORIZONTAL, VERTICAL, D...
? 3 2 Fail: run(1) ? 1 1 Fail: run(0) ? no What are all those Fails after the write? is it still backtracing to previous answers? Is this behaviour the reason why cut is failing in my first code? Please enlighten me. Code signals: Prolog, Cut, Not, Working, FAIL, TABULEIRO, VALUE, LINE, COLUMN, HORIZONTAL, VERTICAL, D...
[ 0.021728515625, 0.01385498046875, 0.00732421875, 0.004974365234375, 0.0029296875, 0.008056640625, -0.006134033203125, 0.00146484375, 0.0184326171875, 0.0152587890625, -0.023193359375, 0.029541015625, -0.0009918212890625, -0.00136566162109375, 0.00653076171875, -0.0031585693359375, 0....
[ 705, 138, 116, 190355, 11675, 27750, 106, 177609, 110, 621, 756, 8382, 7, 7103, 33022, 7464, 4420, 39989, 35166, 224833, 31635, 15400, 59226, 83, 35782, 214, 5117, 18151, 30607, 20016, 28864, 26073, 1250, 4867, 3003, 18, 11205, 27985, 15491...
[ 0.0185089111328125, 0.036712646484375, 0.0386962890625, 0.2073974609375, 0.1407470703125, 0.08563232421875, 0.0260009765625, 0.155029296875, 0.064697265625, 0.0186614990234375, 0.024261474609375, 0.049774169921875, 0.103759765625, 0.07867431640625, 0.1842041015625, 0.03173828125, 0.0...
embed
42398454_c1
42398454
prolog
1
do I get the current working directory? UPDATE: The following also fail: $ yap % Restoring file /usr/lib/Yap/startup.yss YAP 6.2.2 (x86_64-linux): Sat Nov 23 17:51:47 UTC 2013 ?- working_directory(X, ''). no ?- working_directory(X, X). no Code signals: How, working_directory, CurDir, NextDir, Restoring, Yap, startup.y...
do I get the current working directory? UPDATE: The following also fail: $ yap % Restoring file /usr/lib/Yap/startup.yss YAP 6.2.2 (x86_64-linux): Sat Nov 23 17:51:47 UTC 2013 ?- working_directory(X, ''). no ?- working_directory(X, X). no Code signals: How, working_directory, CurDir, NextDir, Restoring, Yap, startup.y...
[ -0.0078125, 0.01153564453125, 0.019775390625, 0.022705078125, -0.00811767578125, 0.02978515625, 0.007049560546875, -0.007293701171875, -0.001617431640625, -0.0498046875, 0.0218505859375, 0.0308837890625, -0.039794921875, -0.0032501220703125, 0.0015106201171875, 0.00058746337890625, 0...
[ 54, 87, 2046, 70, 43581, 20697, 14364, 53, 161521, 25632, 2843, 35782, 3650, 15850, 1745, 9624, 1290, 214, 11435, 223, 42, 5612, 21566, 254, 17137, 2037, 4778, 7, 128706, 2289, 70147, 15276, 13307, 2397, 6077, 20745, 15360, 1105, 729, 373...
[ 0.079345703125, 0.060089111328125, 0.1329345703125, 0.0125732421875, 0.192138671875, 0.208251953125, 0.2010498046875, 0.1390380859375, 0.02313232421875, 0.07110595703125, 0.01959228515625, 0.1859130859375, 0.034332275390625, 0.22216796875, 0.11083984375, 0.0758056640625, 0.1586914062...
embed
33250713_c0
33250713
prolog
0
Title: Prolog return right node of binary tree Problem title: Prolog return right node of binary tree Tags: binary-tree, prolog, recursion Problem: Prolog return right node of binary tree How do I make a method in prolog that takes a node from a binary tree and returns the right node of that node in full. For example i...
Prolog return right node of binary tree Prolog return right node of binary tree binary-tree prolog recursion Prolog Prolog return right node of binary tree How do I make a method in prolog that takes a node from a binary tree and returns the right node of that node in full. For example if you are given node(H,R,L) I wa...
[ 0.0198974609375, 0.00653076171875, 0.02197265625, 0.0002689361572265625, -0.00286865234375, 0.041259765625, -0.017578125, -0.014404296875, -0.00118255615234375, -0.037353515625, 0.000392913818359375, -0.036376953125, -0.0242919921875, 0.006195068359375, 0.0272216796875, -0.000751495361...
[ 1250, 4867, 30646, 7108, 110, 112, 111, 2394, 6635, 53201, 62600, 502, 195625, 1830, 3249, 55300, 51776, 1295, 4393, 34475, 841, 1052, 866, 3444, 3525, 2480 ]
[ 0.1749267578125, 0.25146484375, 0.191162109375, 0.1988525390625, 0.1583251953125, 0.1610107421875, 0.0214996337890625, 0.150390625, 0.10791015625, 0.20361328125, 0.1649169921875, 0.1517333984375, 0.1717529296875, 0.034210205078125, 0.062408447265625, 0.1759033203125, 0.11572265625, ...
embed
10180447_c0
10180447
prolog
0
Title: How to compare the value in the list in Prolog? Problem title: How to compare the value in the list in Prolog? Tags: prolog Problem: How to compare the value in the list in Prolog? List: Bag = [ (a, 1, 2), (b, 2, 3), (c, 3, 4)], I want to compare the result of 1*2 in list a, 2*3 in list b, and 3*4 in list c. And...
How to compare the value in the list in Prolog? How to compare the value in the list in Prolog? prolog How Prolog How to compare the value in the list in Prolog? List: Bag = [ (a, 1, 2), (b, 2, 3), (c, 3, 4)], I want to compare the result of 1*2 in list a, 2*3 in list b, and 3*4 in list c. And sort the result and outpu...
[ -0.004669189453125, 0.0004520416259765625, -0.006378173828125, 0.01287841796875, -0.00946044921875, 0.0074462890625, 0.00003743171691894531, -0.0033111572265625, 0.009521484375, 0.0302734375, -0.00927734375, 0.0203857421875, -0.0108642578125, -0.0211181640625, -0.0023040771484375, -0.0...
[ 11249, 47, 69101, 34292, 23, 5303, 1250, 4867, 502, 70, 32036, 19413, 2203, 4958, 116, 8439, 138, 13956, 3444, 16750, 1639, 304, 363, 876, 617, 501, 12096, 140992, 3642, 54, 10514, 47510 ]
[ 0.100830078125, 0.061248779296875, 0.2393798828125, 0.20068359375, 0.06927490234375, 0.2159423828125, 0.1802978515625, 0.262451171875, 0.111572265625, 0.012969970703125, 0.1666259765625, 0.1998291015625, 0.00921630859375, 0.043792724609375, 0.0160369873046875, 0.058349609375, 0.05050...
embed
13459710_c0
13459710
prolog
0
Title: Hexagonal chess AI in prolog Problem title: Hexagonal chess AI in prolog Tags: artificial-intelligence, prolog, chess Problem: Hexagonal chess AI in prolog I am looking forward to write a "Shafrans hex chess AI in prolog" . Is there any already available open source code available for reference ? http://en.wikip...
Hexagonal chess AI in prolog Hexagonal chess AI in prolog artificial-intelligence prolog chess Hexagonal Hexagonal chess AI in prolog I am looking forward to write a "Shafrans hex chess AI in prolog" . Is there any already available open source code available for reference ? http://en.wikipedia.org/wiki/Hexagonal_chess...
[ 0.00970458984375, -0.00885009765625, 0.02587890625, 0.00634765625, 0.00634765625, 0.008544921875, 0.00689697265625, 0.00439453125, -0.004119873046875, -0.0201416015625, 0.00848388671875, 0.0133056640625, 0.009765625, 0.007354736328125, 0.014892578125, -0.0037689208984375, 0.013366699...
[ 1529, 3798, 6126, 289, 290, 7, 38730, 23, 502, 4867, 66733, 130687, 16487, 40225, 33022, 40798, 56975, 764, 425, 21771, 19882, 9803, 31344, 18151, 91067, 7168, 13691, 13025, 17007, 3004, 7224 ]
[ 0.13037109375, 0.125244140625, 0.144775390625, 0.0960693359375, 0.170654296875, 0.09429931640625, 0.232666015625, 0.0614013671875, 0.1270751953125, 0.2066650390625, 0.1029052734375, 0.08172607421875, 0.01556396484375, 0.053253173828125, 0.030975341796875, 0.03875732421875, 0.19567871...
embed
10674007_c1
10674007
prolog
1
Color), Winner = Color. win(X,Y, Winner) :- state(X,Y, Color), N1 is X + 1, M1 is Y - 1, state(N1, M1, Color), N2 is N1 + 1, M2 is M1 - 1, state(N2, M2, Color), N3 is N2 + 1, M3 is M2 - 1, state(N3, M3, Color), Winner = Color. To test the game you can start it by calling play(Red,0) for example, then it will ask for c...
Color), Winner = Color. win(X,Y, Winner) :- state(X,Y, Color), N1 is X + 1, M1 is Y - 1, state(N1, M1, Color), N2 is N1 + 1, M2 is M1 - 1, state(N2, M2, Color), N3 is N2 + 1, M3 is M2 - 1, state(N3, M3, Color), Winner = Color. To test the game you can start it by calling play(Red,0) for example, then it will ask for c...
[ -0.017578125, 0.00970458984375, -0.002838134765625, 0.025634765625, 0.00439453125, 0.00701904296875, -0.00830078125, -0.038818359375, 0.00164031982421875, 0.01324462890625, 0.01226806640625, 0.031494140625, -0.000598907470703125, -0.017578125, -0.0179443359375, -0.01409912109375, 0.0...
[ 51193, 247, 209447, 2203, 5, 19916, 132, 1542, 4, 1723, 16, 15772, 11341, 541, 418, 83, 1193, 997, 106, 276, 990, 20, 839, 304, 363, 717, 3034, 70, 6712, 831, 4034, 442, 390, 159029, 11301, 80852, 77495, 27781, 26458, 100, 3365, 316, ...
[ 0.329345703125, 0.1182861328125, 0.28271484375, 0.14794921875, 0.142578125, 0.243408203125, 0.07611083984375, 0.1336669921875, 0.053955078125, 0.177490234375, 0.1080322265625, 0.12744140625, 0.17041015625, 0.1461181640625, 0.112060546875, 0.098388671875, 0.1033935546875, 0.17529296...
embed
35256065_c2
35256065
prolog
2
film_agerating(X,18), format('~w ~s 18 ~n',[X," - "]), film_agerating(Y,15), format('~w ~s 15 ~n',[Y," - "]), Code signals: SWI, Prolog, Cinema, Entry, Project, When, Author, Date, Name, Age, Film, Showings, How, Lose, Friends, Alienate, People, Death, Race, Space, Chimps, Chaser, Get, Smart, Yes, Films, film_ageratin...
film_agerating(X,18), format('~w ~s 18 ~n',[X," - "]), film_agerating(Y,15), format('~w ~s 15 ~n',[Y," - "]), Code signals: SWI, Prolog, Cinema, Entry, Project, When, Author, Date, Name, Age, Film, Showings, How, Lose, Friends, Alienate, People, Death, Race, Space, Chimps, Chaser, Get, Smart, Yes, Films, film_ageratin...
[ 0.023681640625, -0.01373291015625, 0.0108642578125, 0.000751495361328125, -0.00130462646484375, 0.0115966796875, 0.01300048828125, 0.025634765625, 0.031005859375, 0.01129150390625, -0.00830078125, -0.0301513671875, -0.01251220703125, -0.0147705078125, -0.0150146484375, -0.0201416015625...
[ 1346, 4588, 98767, 1542, 4, 56641, 9384, 434, 7, 543, 247, 1723, 62155, 423, 28864, 26073, 12, 159, 38969, 1250, 4867, 40572, 357, 15123, 27331, 14847, 61804, 25512, 15757, 72944, 3847, 17367, 5180, 11249, 3731, 102517, 2132, 33, 2182, 41...
[ 0.176513671875, 0.18017578125, 0.2198486328125, 0.07440185546875, 0.0267486572265625, 0.1737060546875, 0.2100830078125, 0.109375, 0.0478515625, 0.1534423828125, 0.0675048828125, 0.07275390625, 0.1580810546875, 0.103271484375, 0.25634765625, 0.276123046875, 0.037322998046875, 0.0605...
embed
30465055_c1
30465055
prolog
1
a match(X,Y) procedure why it gives me undefined match/2 error. GroupA=[germany,brazil,turkey,korea]. GroupB=[china,usa,chile,italy]. member(X,[X|_]). member(X,[_|T]):- member(X,T). memberence(X):- member(X,GroupA). member(X,GroupB). collision(X,Y):- member(X,GroupA), member(Y,GroupA). member(X,GroupB), member(Y,Group...
a match(X,Y) procedure why it gives me undefined match/2 error. GroupA=[germany,brazil,turkey,korea]. GroupB=[china,usa,chile,italy]. member(X,[X|_]). member(X,[_|T]):- member(X,T). memberence(X):- member(X,GroupA). member(X,GroupB). collision(X,Y):- member(X,GroupA), member(Y,GroupA). member(X,GroupB), member(Y,Group...
[ 0.003936767578125, -0.001953125, 0.01556396484375, 0.00604248046875, -0.03076171875, 0.0184326171875, -0.013427734375, 0.01226806640625, 0.01068115234375, 0.0279541015625, 0.006622314453125, 0.01171875, 0.041015625, -0.0274658203125, 0.00122833251953125, -0.01214599609375, 0.01202392...
[ 14858, 1542, 4, 1723, 50491, 15400, 76199, 163, 9232, 5983, 297, 12477, 18499, 10760, 284, 1505, 669, 53, 72872, 987, 19770, 81162, 571, 42072, 11684, 1861, 133, 913, 538, 32786, 618, 6620, 205072, 61770, 6889, 132, 1328, 62378, 28864, 26...
[ 0.282470703125, 0.196044921875, 0.0714111328125, 0.2064208984375, 0.20849609375, 0.06988525390625, 0.07379150390625, 0.07568359375, 0.138916015625, 0.2230224609375, 0.0927734375, 0.25830078125, 0.2325439453125, 0.2257080078125, 0.160888671875, 0.077880859375, 0.056304931640625, 0.0...
embed
26900414_c0
26900414
prolog
0
Title: Difference between two variant implementations Problem title: Difference between two variant implementations Tags: prolog, iso-prolog Problem: Difference between two variant implementations Is there any logical difference between these two implementations of a variant predicate? variant1(X,Y) :- subsumes_term(X,...
Difference between two variant implementations Difference between two variant implementations prolog iso-prolog Difference variant1 subsumes_term variant2 copy_term Difference between two variant implementations Is there any logical difference between these two implementations of a variant predicate?
[ 0.010009765625, 0.00732421875, -0.0091552734375, 0.0233154296875, -0.01239013671875, 0.00799560546875, -0.015869140625, 0.00396728515625, 0.01422119140625, -0.01068115234375, 0.0274658203125, 0.031494140625, -0.004058837890625, 0.01043701171875, 0.0224609375, 0.0008544921875, 0.01647...
[ 803, 18234, 6620, 17721, 6626, 20117, 208124, 502, 4867, 13882, 3454, 418, 1614, 11832, 32166, 304, 43658, 2499, 62775, 60212, 6097, 1653, 2063, 67 ]
[ 0.1260986328125, 0.2347412109375, 0.07666015625, 0.1678466796875, 0.1607666015625, 0.27783203125, 0.205810546875, 0.122802734375, 0.1900634765625, 0.126220703125, 0.1185302734375, 0.06304931640625, 0.1092529296875, 0.1378173828125, 0.12744140625, 0.1563720703125, 0.1361083984375, 0...
embed
70596083_c0
70596083
prolog
0
Title: Suffix of a list in prolog Problem title: Suffix of a list in prolog Tags: prolog Problem: Suffix of a list in prolog I want to define a predicate suffix (S,L) which holds if S is a list which is a suffix of list L . For exemple: ?− suffix([a,b,c],[b,c]). true. ?− suffix([a,b,c],[b,a]). false. I tried using suff...
Suffix of a list in prolog Suffix of a list in prolog prolog Suffix Suffix of a list in prolog I want to define a predicate suffix (S,L) which holds if S is a list which is a suffix of list L . For exemple: I tried using suffix(S,L):- append(_,S,L). but this won't work with my examples, shown above.
[ 0.00567626953125, -0.00555419921875, 0.02001953125, -0.005401611328125, -0.0263671875, -0.0196533203125, -0.00396728515625, 0.00433349609375, 0.0115966796875, 0.0118408203125, -0.01904296875, -0.0152587890625, -0.01470947265625, -0.00063323974609375, -0.000827789306640625, 0.0066528320...
[ 142830, 55923, 111, 5303, 502, 4867, 23, 3444, 61924, 1653, 2063, 67, 133784, 425, 294, 4, 866, 16401, 2174, 159, 83, 339, 18632, 37842, 114689, 71, 4488, 27781 ]
[ 0.1572265625, 0.2177734375, 0.0703125, 0.220458984375, 0.15478515625, 0.2237548828125, 0.031951904296875, 0.04583740234375, 0.1422119140625, 0.0970458984375, 0.1419677734375, 0.0355224609375, 0.1981201171875, 0.1070556640625, 0.07513427734375, 0.059051513671875, 0.1209716796875, 0....
embed
30142740_c0
30142740
prolog
0
Title: All partitions of a list in prolog Problem title: All partitions of a list in prolog Tags: prolog Problem: All partitions of a list in prolog I am coding in Prolog. I want to find all distinct partitions of a list. I look at a list as a set here. Each partition is a set of sets in which none is empty, the union ...
All partitions of a list in prolog All partitions of a list in prolog prolog All All partitions of a list in prolog I am coding in Prolog. I want to find all distinct partitions of a list. I look at a list as a set here. Each partition is a set of sets in which none is empty, the union of all of them is the main set, a...
[ 0.000606536865234375, -0.01190185546875, 0.0130615234375, -0.004547119140625, -0.01422119140625, -0.0081787109375, -0.0113525390625, -0.01190185546875, 0.01080322265625, -0.001373291015625, 0.0021514892578125, 0.0220947265625, 0.0235595703125, -0.0008697509765625, -0.0035552978515625, ...
[ 3164, 2878, 5256, 111, 5303, 23, 502, 4867, 552, 6238, 1250, 7413, 756, 117781, 6713, 5423, 98423, 1363, 201505, 69941, 5201, 80836, 90825, 1940, 7, 58994 ]
[ 0.1461181640625, 0.281982421875, 0.19189453125, 0.07373046875, 0.1907958984375, 0.056060791015625, 0.141357421875, 0.22216796875, 0.0633544921875, 0.03924560546875, 0.10595703125, 0.0916748046875, 0.080078125, 0.137939453125, 0.0269012451171875, 0.1337890625, 0.07110595703125, 0.10...
embed
47248422_c0
47248422
prolog
0
Title: How to append list to a list in Prolog? Problem title: How to append list to a list in Prolog? Tags: prolog, list, append Problem: How to append list to a list in Prolog? I want to append a list to a list. foo([a,b,c]). goo([d,e,f]). hi(X):-append(foo(X),goo(X)). I want to get the result as shown below. But I re...
How to append list to a list in Prolog? How to append list to a list in Prolog? prolog list append How Prolog How to append list to a list in Prolog? I want to append a list to a list. I want to get the result as shown below. But I realized I cannot execute foo(X) and goo(X) .
[ 0.00885009765625, 0.0091552734375, 0.01422119140625, 0.01519775390625, 0.006072998046875, 0.01153564453125, -0.000732421875, 0.026123046875, 0.00823974609375, -0.0107421875, 0.00634765625, -0.0238037109375, -0.010009765625, 0.0157470703125, 0.0079345703125, -0.01611328125, 0.01318359...
[ 11249, 47, 114689, 71, 5303, 23, 1250, 4867, 10, 502, 3444, 16750, 185171, 53418, 71924, 5775, 31, 132, 1542, 136, 738 ]
[ 0.06549072265625, 0.12646484375, 0.174072265625, 0.1199951171875, 0.2276611328125, 0.0640869140625, 0.1514892578125, 0.2279052734375, 0.0162506103515625, 0.1195068359375, 0.016082763671875, 0.025604248046875, 0.002777099609375, 0.063232421875, 0.1285400390625, 0.0948486328125, 0.1229...
embed
68309561_c0
68309561
prolog
0
Title: How to sum the results without findall Problem title: How to sum the results without findall Tags: clpfd, prolog Problem: How to sum the results without findall Is there an efficient and generic way of summing up results without generating an intermediate list: main(A) :- B #< 4000000, B mod 2 #= 0, findall(B, f...
How to sum the results without findall How to sum the results without findall clpfd prolog How sum_list How to sum the results without findall Is there an efficient and generic way of summing up results without generating an intermediate list: Note: this is Project Euler #2.
[ 0.007537841796875, 0.00118255615234375, 0.00909423828125, 0.000514984130859375, -0.02490234375, -0.0020294189453125, -0.000911712646484375, 0.007476806640625, 0.04150390625, -0.064453125, 0.0008697509765625, -0.0296630859375, 0.0211181640625, 0.00970458984375, 0.03173828125, 0.01287841...
[ 11249, 47, 10554, 70, 50339, 15490, 7413, 5584, 33139, 39557, 71, 502, 4867, 6562, 93766, 189534, 3917, 166, 58838, 1257, 12663, 81814, 5303, 27331, 5177, 603, 64947 ]
[ 0.0455322265625, 0.05975341796875, 0.2279052734375, 0.036163330078125, 0.201171875, 0.1614990234375, 0.140625, 0.19775390625, 0.024810791015625, 0.051055908203125, 0.0987548828125, 0.08758544921875, 0.1649169921875, 0.1866455078125, 0.127685546875, 0.11639404296875, 0.051544189453125...
embed
7815686_c0
7815686
prolog
0
Title: Prolog, program to determine if two lists are not equal Problem title: Prolog, program to determine if two lists are not equal Tags: prolog Problem: Prolog, program to determine if two lists are not equal I want to build a Prolog program to determine if two lists, provided as arguments, are not equal. This is wh...
Prolog, program to determine if two lists are not equal Prolog, program to determine if two lists are not equal prolog Prolog Prolog, program to determine if two lists are not equal I want to build a Prolog program to determine if two lists, provided as arguments, are not equal. This is what I did so far.
[ 0.0230712890625, 0.00885009765625, 0.0225830078125, 0.0008392333984375, -0.021484375, 0.0166015625, -0.0155029296875, -0.00136566162109375, -0.0120849609375, 0.0341796875, 0.000553131103515625, -0.01708984375, 0.00225830078125, 0.0164794921875, 0.009521484375, 0.000051021575927734375, ...
[ 1250, 4867, 1528, 47, 83324, 2174, 6626, 5303, 7, 621, 959, 105950, 502, 4, 3444, 45367, 62952, 10750, 2367, 6777, 2060 ]
[ 0.17236328125, 0.257568359375, 0.2021484375, 0.048980712890625, 0.168212890625, 0.107666015625, 0.12457275390625, 0.2158203125, 0.0596923828125, 0.118408203125, 0.168701171875, 0.2060546875, 0.136962890625, 0.00608062744140625, 0.07696533203125, 0.116943359375, 0.05517578125, 0.168...
embed
68512904_c2
68512904
prolog
2
D], {is_det(Num, D)}. is_noun(plural, boys). is_noun(singular, boy). is_noun(plural, girls). Code signals: Natural, Language, All, _4326, ERROR, Stream, user_input:242:4, Syntax, Operator, Tokenizer, go1, Out, Word, Rest, WordChs, List, Main, reset_gensym, Grammar, Parser, noun_phrase, Num, verb_phrase, Some, DET, ADJ,...
D], {is_det(Num, D)}. is_noun(plural, boys). is_noun(singular, boy). is_noun(plural, girls). Code signals: Natural, Language, All, _4326, ERROR, Stream, user_input:242:4, Syntax, Operator, Tokenizer, go1, Out, Word, Rest, WordChs, List, Main, reset_gensym, Grammar, Parser, noun_phrase, Num, verb_phrase, Some, DET, ADJ,...
[ -0.0040283203125, 0.0002765655517578125, 0.0223388671875, -0.007659912109375, 0.0196533203125, 0.005462646484375, 0.006927490234375, -0.0169677734375, 0.004425048828125, -0.017333984375, -0.003997802734375, -0.03076171875, -0.026123046875, -0.003662109375, -0.0021820068359375, 0.010559...
[ 391, 268, 4, 164, 3667, 839, 316, 16, 8152, 5, 83, 157, 309, 2424, 82451, 115982, 194, 6953, 35975, 25299, 29526, 28864, 26073, 7, 12, 24955, 83658, 3164, 11548, 4046, 151206, 24638, 6, 115061, 38937, 73, 7077, 25732, 304, 617, 19010, ...
[ 0.1888427734375, 0.1005859375, 0.013519287109375, 0.1533203125, 0.258544921875, 0.0587158203125, 0.1856689453125, 0.02935791015625, 0.00238037109375, 0.0165863037109375, 0.17626953125, 0.07672119140625, 0.1673583984375, 0.12890625, 0.1656494140625, 0.2156982421875, 0.162109375, 0.1...
embed
44496431_c0
44496431
prolog
0
Title: pow(X,Y,Z) &lt;=&gt; Z = X^Y with add Problem title: pow(X,Y,Z) &lt;=&gt; Z = X^Y with add Tags: addition, prolog, pow Problem: pow(X,Y,Z) <=> Z = X^Y with add Would it be possible to do "pow" with "add" predicate (or just X is Y + Z )? I make this: pow(0,1,1). pow(_,0,1). pow(X,Y,Z) :- Y1 is Y - 1, pow(X,Y1,Z1)...
pow(X,Y,Z) &lt;=&gt; Z = X^Y with add pow(X,Y,Z) &lt;=&gt; Z = X^Y with add addition prolog pow pow(X,Y,Z) <=> Z = X^Y with add Would it be possible to do "pow" with "add" predicate (or just X is Y + Z )? I make this: But I want also make it with " + " (just for practise) like 3^2 = 3 * 3 = 3 + 3 + 3
[ -0.0106201171875, -0.02099609375, 0.012939453125, 0.01373291015625, -0.00244140625, 0.0164794921875, -0.0133056640625, -0.0025177001953125, 0.025146484375, -0.0201416015625, 0.0166015625, -0.00897216796875, -0.01708984375, 0.019287109375, 0.026611328125, 0.00439453125, 0.000984191894...
[ 23827, 1542, 1723, 1511, 1277, 5386, 567, 2203, 1193, 8353, 678, 15190, 66044, 502, 4867, 154559, 186, 7722, 54, 771, 434, 11, 4028, 1653, 2063, 67, 83, 990, 997, 3249, 903, 3444, 17823, 118, 138, 304, 661 ]
[ 0.2103271484375, 0.1201171875, 0.130615234375, 0.1697998046875, 0.032440185546875, 0.064208984375, 0.17333984375, 0.03155517578125, 0.14306640625, 0.1177978515625, 0.066650390625, 0.1668701171875, 0.170654296875, 0.127685546875, 0.18408203125, 0.004180908203125, 0.001068115234375, ...
embed
17133256_c2
17133256
prolog
2
a tawny color?'),nl,!, complete(c12). ask(c13):- write('has it dark spots?'),nl, !, complete(c13). ask(c14):- write('has it black Code signals: Error, Prolog, c10, ungulate_toed, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, Recognition, Done, Don, Discovering, Yes, Conclusion, Description, description1, conc...
a tawny color?'),nl,!, complete(c12). ask(c13):- write('has it dark spots?'),nl, !, complete(c13). ask(c14):- write('has it black Code signals: Error, Prolog, c10, ungulate_toed, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, Recognition, Done, Don, Discovering, Yes, Conclusion, Description, description1, conc...
[ 0.01373291015625, 0.024658203125, -0.004241943359375, 0.016845703125, 0.01434326171875, -0.005462646484375, 0.0098876953125, -0.01153564453125, -0.0027618408203125, -0.0033416748046875, -0.0050048828125, 0.0179443359375, -0.0172119140625, 0.0174560546875, 0.0230712890625, 0.00210571289...
[ 10, 308, 434, 299, 10576, 32, 13169, 38, 28484, 238, 55102, 26458, 63258, 33022, 10557, 442, 43334, 13162, 7, 711, 4, 65283, 22556, 28864, 26073, 12, 212059, 1250, 4867, 501, 963, 127728, 19309, 188, 297, 1662, 1530, 2681, 2592, 1837, 2...
[ 0.14794921875, 0.1495361328125, 0.1558837890625, 0.241943359375, 0.200439453125, 0.0657958984375, 0.0989990234375, 0.0634765625, 0.1556396484375, 0.0166015625, 0.1083984375, 0.1522216796875, 0.1072998046875, 0.1361083984375, 0.1510009765625, 0.1317138671875, 0.1575927734375, 0.1845...
embed
51826303_c0
51826303
prolog
0
Title: Comparing the value of a variable prolog Problem title: Comparing the value of a variable prolog Tags: prolog Problem: Comparing the value of a variable prolog Is it possible to compare a variable to an atom ? Is it possible to compare the contents of a variable with an atom as shown below? Y = [[cirlce], nextTo...
Comparing the value of a variable prolog Comparing the value of a variable prolog prolog Comparing nth0 Comparing the value of a variable prolog Is it possible to compare a variable to an atom ? Is it possible to compare the contents of a variable with an atom as shown below?
[ 0.00732421875, -0.01483154296875, 0.00262451171875, 0.02001953125, 0.0159912109375, 0.00072479248046875, 0.0252685546875, -0.00347900390625, 0.01226806640625, 0.00049591064453125, 0.011962890625, 0.02099609375, -0.006988525390625, -0.035888671875, 0.004180908203125, -0.0140380859375, ...
[ 113307, 214, 34292, 77336, 502, 4867, 927, 2389, 442, 7722, 47, 69101, 34627, 2071, 10941, 678, 127887, 35064 ]
[ 0.168212890625, 0.046295166015625, 0.1221923828125, 0.269287109375, 0.11956787109375, 0.2158203125, 0.075439453125, 0.126953125, 0.04180908203125, 0.147216796875, 0.11907958984375, 0.2098388671875, 0.25048828125, 0.0216217041015625, 0.168212890625, 0.07720947265625, 0.03546142578125,...
embed
15577286_c0
15577286
prolog
0
Title: Separating an atom name separated by dash in Prolog Problem title: Separating an atom name separated by dash in Prolog Tags: prolog, lambda Problem: Separating an atom name separated by dash in Prolog functor([a1-b1,a2-b2,a3-b3,a4-b4]). I need to separate a's and b's and construct new two functors like functora(...
Separating an atom name separated by dash in Prolog Separating an atom name separated by dash in Prolog prolog lambda Separating Prolog a1-b1 a2-b2 a3-b3 a4-b4 Separating an atom name separated by dash in Prolog I need to separate a's and b's and construct new two functors like
[ 0.02197265625, -0.01336669921875, -0.009521484375, 0.02587890625, -0.019287109375, 0.00897216796875, 0.005767822265625, 0.029296875, -0.0038909912109375, 0.01043701171875, -0.007049560546875, -0.001068115234375, 0.007720947265625, -0.006317138671875, -0.01141357421875, -0.022705078125,...
[ 503, 6276, 1916, 34627, 9351, 84797, 390, 381, 127, 1250, 4867, 71, 23, 502, 21, 6492, 85, 10, 20268, 275, 418, 18504, 304, 27495, 363, 35748, 617, 3871, 25, 136, 876, 64549, 3525, 6626, 7477, 18770, 1884 ]
[ 0.06005859375, 0.1820068359375, 0.06494140625, 0.2169189453125, 0.147216796875, 0.19677734375, 0.07568359375, 0.1588134765625, 0.174072265625, 0.169189453125, 0.2379150390625, 0.032745361328125, 0.0229949951171875, 0.12841796875, 0.030426025390625, 0.162109375, 0.1116943359375, 0.0...
embed
7390700_c0
7390700
prolog
0
Title: PROLOG.NET - Connect to Database Problem title: PROLOG.NET - Connect to Database Tags: sql, prolog, ado.net, .net Problem: PROLOG.NET - Connect to Database I'm using Prolog.NET and I want to query an SQL Database, but I don't want to use an OBDC connection. It's possible connect to a database using ADO.NET or so...
PROLOG.NET - Connect to Database PROLOG.NET - Connect to Database sql prolog ado.net .net PROLOG.NET Connect Database ado.net PROLOG.NET - Connect to Database I'm using Prolog.NET and I want to query an SQL Database, but I don't want to use an OBDC connection. It's possible connect to a database using ADO.NET or someth...
[ 0.0269775390625, 0.01129150390625, 0.0142822265625, 0.006011962890625, -0.023681640625, -0.00049591064453125, -0.0306396484375, -0.0064697265625, 0.000675201416015625, -0.0810546875, 0.01251220703125, -0.02001953125, -0.0272216796875, -0.006011962890625, -0.006683349609375, -0.02307128...
[ 10514, 47510, 17777, 20, 62448, 47, 187781, 91, 99247, 502, 4867, 1138, 1179, 5, 17368, 1250, 3444, 41, 1294, 80866, 1284, 2301, 18, 4527, 35988, 21960, 94878, 1650, 7722, 37067, 63399, 41388, 1884, 42380 ]
[ 0.17529296875, 0.2459716796875, 0.2041015625, 0.027191162109375, 0.209228515625, 0.1533203125, 0.2010498046875, 0.01263427734375, 0.17138671875, 0.141845703125, 0.246337890625, 0.1976318359375, 0.1832275390625, 0.04852294921875, 0.082763671875, 0.1646728515625, 0.124755859375, 0.09...
embed
70087298_c0
70087298
prolog
0
Title: How to print this in one line statement in Prolog Problem title: How to print this in one line statement in Prolog Tags: printing, prolog, swi-prolog Problem: How to print this in one line statement in Prolog How can i print this string in prolog in the best way: predicate([], L, Id, L2):- length(L2, N), write('...
How to print this in one line statement in Prolog How to print this in one line statement in Prolog printing prolog swi-prolog How Prolog How to print this in one line statement in Prolog How can i print this string in prolog in the best way:
[ -0.000659942626953125, 0.01214599609375, -0.0128173828125, 0.0186767578125, -0.00701904296875, 0.006439208984375, 0.009765625, -0.00714111328125, 0.001739501953125, -0.036865234375, 0.001220703125, -0.005401611328125, -0.007476806640625, -0.0130615234375, 0.001434326171875, 0.013061523...
[ 11249, 28412, 903, 23, 1632, 13315, 63805, 1250, 4867, 47, 2448, 1916, 502, 2452, 3454, 831, 17, 79315, 2965, 3917 ]
[ 0.0445556640625, 0.2183837890625, 0.1630859375, 0.084228515625, 0.142333984375, 0.17236328125, 0.229248046875, 0.156005859375, 0.230712890625, 0.0267486572265625, 0.120849609375, 0.008026123046875, 0.1309814453125, 0.11968994140625, 0.121826171875, 0.01210784912109375, 0.025222778320...
embed
39225885_c0
39225885
prolog
0
Title: Emacs crashes with SWI-prolog Problem title: Emacs crashes with SWI-prolog Tags: swi-prolog, macos, prolog Problem: Emacs crashes with SWI-prolog I'm trying to run emacs with SWI-prolog on a mac, using the "emacs." command. However when i do this it instantly crashes before i have any chance at reading the error...
Emacs crashes with SWI-prolog Emacs crashes with SWI-prolog swi-prolog macos prolog Emacs SWI-prolog Emacs crashes with SWI-prolog I'm trying to run emacs with SWI-prolog on a mac, using the "emacs." command. However when i do this it instantly crashes before i have any chance at reading the error message being display...
[ 0.033935546875, 0.01348876953125, -0.0123291015625, 0.0004673004150390625, -0.0185546875, 0.02197265625, -0.0098876953125, 0.005859375, -0.01324462890625, -0.03076171875, 0.002288818359375, -0.00457763671875, -0.0198974609375, 0.0118408203125, 0.03271484375, -0.0203857421875, -0.0022...
[ 85269, 4439, 150631, 90, 678, 159, 38969, 3454, 4867, 91, 2452, 291, 7840, 502, 31577, 11675, 352, 2263, 7, 9, 98, 19138, 17368, 11883, 75101, 33306, 3229, 442, 34648, 8108, 18227, 16454, 18499, 26008, 44116, 10752, 4358 ]
[ 0.1959228515625, 0.2374267578125, 0.2071533203125, 0.03759765625, 0.107421875, 0.0965576171875, 0.2490234375, 0.1475830078125, 0.20458984375, 0.0106201171875, 0.217041015625, 0.02630615234375, 0.115966796875, 0.08148193359375, 0.054168701171875, 0.08795166015625, 0.1324462890625, 0...
embed
37330596_c0
37330596
prolog
0
Title: How can i delete every item from list in Prolog Problem title: How can i delete every item from list in Prolog Tags: prolog-dif, prolog, list Problem: How can i delete every item from list in Prolog I want to define a relation del_all(X, L, L1) for removing all items X (if any) from list L . Sample query: ?- del...
How can i delete every item from list in Prolog How can i delete every item from list in Prolog prolog-dif prolog list list How Prolog del_all How can i delete every item from list in Prolog I want to define a relation del_all(X, L, L1) for removing all items X (if any) from list L . Sample query:
[ 0.000446319580078125, 0.00079345703125, -0.006683349609375, 0.0069580078125, -0.0052490234375, 0.0076904296875, 0.008056640625, 0.00183868408203125, 0.0216064453125, -0.01312255859375, 0.029296875, 0.00372314453125, 0.0150146484375, 0.0220947265625, 0.004364013671875, 0.005096435546875...
[ 11249, 831, 17, 154109, 11907, 35735, 1295, 5303, 23, 1250, 4867, 502, 428, 420, 146, 5584, 3444, 61924, 41911, 1542, 339, 17727, 49146, 6496, 756, 55769, 1193, 33209, 41 ]
[ 0.0267486572265625, 0.07769775390625, 0.056182861328125, 0.2314453125, 0.177734375, 0.166015625, 0.13232421875, 0.1754150390625, 0.06353759765625, 0.156982421875, 0.2423095703125, 0.10296630859375, 0.0318603515625, 0.088134765625, 0.1544189453125, 0.171630859375, 0.0159759521484375, ...
embed
2044643_c1
2044643
prolog
1
0>7 ? abort % Execution Aborted ?- remaining(2,1,D,M). D = bleah, M = [3, 4] ; D = bleah2, M = [4] ; D = bleah8, M = [] ; ERROR: >/2: Arguments are not sufficiently instantiated ^ Exception: (10) _G270+0>7 ? abort % Execution Aborted ?- x([_,15,_,_],D). D = woot. Suggestions welcome. Code signals: Prolog, Arguments, bl...
0>7 ? abort % Execution Aborted ?- remaining(2,1,D,M). D = bleah, M = [3, 4] ; D = bleah2, M = [4] ; D = bleah8, M = [] ; ERROR: >/2: Arguments are not sufficiently instantiated ^ Exception: (10) _G270+0>7 ? abort % Execution Aborted ?- x([_,15,_,_],D). D = woot. Suggestions welcome. Code signals: Prolog, Arguments, bl...
[ 0.009033203125, 0.0233154296875, 0.000469207763671875, 0.000667572021484375, -0.014404296875, 0.03662109375, -0.00066375732421875, 0.00341796875, 0.01116943359375, 0.0211181640625, 0.01220703125, 0.005584716796875, -0.019287109375, -0.0179443359375, -0.00537109375, -0.01336669921875, ...
[ 757, 2740, 966, 705, 64853, 1745, 211603, 1830, 62, 3422, 3674, 9, 47143, 214, 54753, 418, 397, 594, 391, 2203, 2586, 1366, 276, 201, 304, 4, 59535, 1019, 151206, 24638, 977, 12477, 112140, 621, 959, 6, 129980, 34648, 14, 27686, 5443, ...
[ 0.16162109375, 0.13623046875, 0.2049560546875, 0.06683349609375, 0.271728515625, 0.160888671875, 0.202880859375, 0.127197265625, 0.0552978515625, 0.2236328125, 0.1629638671875, 0.02581787109375, 0.1619873046875, 0.10321044921875, 0.00341796875, 0.00390625, 0.0814208984375, 0.076721...
embed
71373880_c0
71373880
prolog
0
Title: Prolog predicate (division) that calculate the expression Problem title: Prolog predicate (division) that calculate the expression Tags: prolog Problem: Prolog predicate (division) that calculate the expression Write a Prolog predicate (division) that calculate the expression (C=A/B) and write the result, where ...
Prolog predicate (division) that calculate the expression Prolog predicate (division) that calculate the expression prolog Prolog Prolog predicate (division) that calculate the expression Write a Prolog predicate (division) that calculate the expression (C=A/B) and write the result, where B should not equal 0, A&B shou...
[ 0.004913330078125, 0.016357421875, 0.006256103515625, -0.0130615234375, -0.00136566162109375, 0.0067138671875, 0.01544189453125, -0.002655029296875, -0.00146484375, -0.00982666015625, 0.0002460479736328125, 0.0048828125, -0.02001953125, -0.0208740234375, 0.007415771484375, -0.002426147...
[ 1250, 4867, 1653, 2063, 67, 428, 25826, 450, 74481, 125195, 502, 601, 18781, 441, 1369, 284, 64, 571, 33022, 16750, 335, 5608, 959, 105950, 757, 62, 1230, 107730, 3674, 1295, 38937, 17368, 12301 ]
[ 0.1748046875, 0.240478515625, 0.195556640625, 0.222900390625, 0.1280517578125, 0.142822265625, 0.2010498046875, 0.0406494140625, 0.2244873046875, 0.22509765625, 0.1439208984375, 0.0638427734375, 0.087890625, 0.10479736328125, 0.0469970703125, 0.0140838623046875, 0.208740234375, 0.1...
embed
44112074_c0
44112074
prolog
0
Title: Converting to dot notation in prolog Problem title: Converting to dot notation in prolog Tags: list, prolog, syntax Problem: Converting to dot notation in prolog I have to represent [[fruits],[ ] ] in dot notation form in Prolog, and below is how I did it ,but something tells me this is wrong because I have expa...
Converting to dot notation in prolog Converting to dot notation in prolog list prolog syntax Converting Converting to dot notation in prolog I have to represent [[fruits],[ ] ] in dot notation form in Prolog, and below is how I did it ,but something tells me this is wrong because I have expanded [[ ]] too, is this inco...
[ 0.0302734375, 0.01043701171875, -0.020263671875, 0.0084228515625, -0.01611328125, 0.00543212890625, -0.00860595703125, 0.0022430419921875, -0.005462646484375, -0.035888671875, -0.005096435546875, 0.01171875, -0.0111083984375, -0.0016326904296875, -0.0128173828125, -0.020263671875, 0....
[ 1657, 814, 1916, 47, 20633, 110, 22062, 23, 502, 4867, 5303, 86531, 765, 33636, 23129, 14481, 1065, 3173, 1250, 35064, 14192, 44691, 71062, 297, 110558, 5792, 214552 ]
[ 0.0546875, 0.1279296875, 0.0521240234375, 0.0899658203125, 0.2457275390625, 0.1904296875, 0.1324462890625, 0.02984619140625, 0.14453125, 0.2247314453125, 0.1690673828125, 0.03167724609375, 0.0001220703125, 0.209716796875, 0.1981201171875, 0.1893310546875, 0.00250244140625, 0.097656...
embed
10262070_c0
10262070
prolog
0
Title: Test for handling list in Prolog Problem title: Test for handling list in Prolog Tags: prolog Problem: Test for handling list in Prolog I want it to be working like this so then d disappears etc. ?- remove_last_item([a,b,c,d], L). L = [a, b, c] ? Does anyone know how to do this as I got this line but what other ...
Test for handling list in Prolog Test for handling list in Prolog prolog Test Prolog remove_last_item Test for handling list in Prolog I want it to be working like this so then d disappears etc. Does anyone know how to do this as I got this line but what other line should I add to this so then the above can be achieved...
[ 0.00177764892578125, 0.015869140625, -0.0042724609375, 0.013671875, -0.01226806640625, 0.0021209716796875, -0.01312255859375, 0.01031494140625, 0.00897216796875, -0.0184326171875, 0.0145263671875, -0.018798828125, -0.0079345703125, 0.011474609375, -0.0026092529296875, 0.00836181640625,...
[ 8647, 100, 45064, 5303, 1250, 4867, 23, 502, 87388, 19777, 217, 195, 3444, 20697, 1884, 104, 213566, 7, 3714, 13315, 15190, 69307 ]
[ 0.20068359375, 0.053375244140625, 0.2030029296875, 0.1746826171875, 0.151611328125, 0.2232666015625, 0.00930023193359375, 0.08447265625, 0.17724609375, 0.172607421875, 0.148193359375, 0.097412109375, 0.0745849609375, 0.0782470703125, 0.0273590087890625, 0.125732421875, 0.157104492187...
embed
43352008_c0
43352008
prolog
0
Title: Generate n-digit number w/o 1s and 0s in prolog Problem title: Generate n-digit number w/o 1s and 0s in prolog Tags: random, prolog, clpfd Problem: Generate n-digit number w/o 1s and 0s in prolog I am a beginner to prolog. The task is to generate n-digit numbers without using ones and zeroes. How would this be d...
Generate n-digit number w/o 1s and 0s in prolog Generate n-digit number w/o 1s and 0s in prolog random prolog clpfd Generate Generate n-digit number w/o 1s and 0s in prolog I am a beginner to prolog. The task is to generate n-digit numbers without using ones and zeroes. How would this be done? Do you generate random nu...
[ -0.0081787109375, 0.0101318359375, -0.0174560546875, -0.018310546875, -0.004364013671875, -0.00136566162109375, 0.006683349609375, -0.00701904296875, 0.01031494140625, -0.036376953125, -0.004974365234375, 0.001190185546875, -0.01165771484375, 0.0150146484375, 0.0208740234375, 0.0018081...
[ 155370, 67, 653, 4803, 217, 14012, 148, 64, 31, 106, 7, 136, 757, 23, 502, 4867, 96759, 33139, 39557, 71, 9842, 1679, 66211, 139392, 9, 101935, 15490, 17368, 64333, 45234, 2806, 16940, 154109, 165207, 24500 ]
[ 0.1734619140625, 0.05743408203125, 0.1475830078125, 0.14306640625, 0.0794677734375, 0.1629638671875, 0.005889892578125, 0.0955810546875, 0.06976318359375, 0.1014404296875, 0.0799560546875, 0.08489990234375, 0.1552734375, 0.03314208984375, 0.1639404296875, 0.2216796875, 0.172729492187...
embed
35024348_c0
35024348
prolog
0
Title: Palindrome predicate using prolog Problem title: Palindrome predicate using prolog Tags: palindrome, list, prolog Problem: Palindrome predicate using prolog I'm new to Prolog, and I have an exercise which asks to make a palindrome predicate that returns a Boolean value? This boolean is true if the list is Palind...
Palindrome predicate using prolog Palindrome predicate using prolog palindrome list prolog prolog Palindrome Palindrome predicate using prolog I'm new to Prolog, and I have an exercise which asks to make a palindrome predicate that returns a Boolean value? This boolean is true if the list is Palindrome otherwise return...
[ 0.00183868408203125, 0.0047607421875, -0.00628662109375, -0.0012969970703125, 0.0050048828125, 0.04736328125, 0.020263671875, -0.00927734375, -0.003387451171875, -0.0225830078125, 0.01092529296875, -0.0078125, -0.00101470947265625, -0.00970458984375, -0.01409912109375, -0.0020599365234...
[ 12530, 73, 102851, 1653, 2063, 67, 17368, 502, 4867, 17923, 19, 5303, 3525, 1250, 81979, 30646, 73783, 34677, 34292, 337, 31, 29568, 2174, 98320 ]
[ 0.1654052734375, 0.1104736328125, 0.21826171875, 0.1448974609375, 0.205810546875, 0.100341796875, 0.0899658203125, 0.12451171875, 0.2164306640625, 0.1314697265625, 0.0731201171875, 0.172119140625, 0.032928466796875, 0.1011962890625, 0.1177978515625, 0.1292724609375, 0.1119384765625, ...
embed
60475302_c0
60475302
prolog
0
Title: How to combine list operations? Problem title: How to combine list operations? Tags: prolog Problem: How to combine list operations? I would like to count how often element x is in list L. I know there is a way with recursion, but is it also possible like this: > count(X,L,C) = C is (length(L,Length) - length(de...
How to combine list operations? How to combine list operations? prolog How Length List2 How to combine list operations? I would like to count how often element x is in list L. I know there is a way with recursion, but is it also possible like this: The compiler say no:) What could I change?
[ -0.01385498046875, 0.03564453125, -0.01068115234375, 0.0113525390625, -0.009521484375, 0.0003604888916015625, 0.00909423828125, -0.008544921875, 0.037841796875, -0.0223388671875, -0.0076904296875, -0.0030517578125, 0.025390625, 0.0196533203125, -0.00183868408203125, -0.0052490234375, ...
[ 11249, 47, 70163, 5303, 41018, 7, 502, 4867, 77554, 927, 32036, 304, 2806, 1884, 54529, 3642, 27983, 12830, 1022, 83, 23, 339, 3917, 195625, 1830, 7722, 9969, 34759, 110, 15549 ]
[ 0.0775146484375, 0.057708740234375, 0.2239990234375, 0.211669921875, 0.218505859375, 0.08819580078125, 0.10009765625, 0.1673583984375, 0.06658935546875, 0.03839111328125, 0.1690673828125, 0.0797119140625, 0.0008635520935058594, 0.057159423828125, 0.159912109375, 0.06640625, 0.1989746...
embed
18007932_c0
18007932
prolog
0
Title: Queens Domination Problem title: Queens Domination Tags: prolog, n-queens Problem: Queens Domination Queen Domination Given an n×n board, the domination number is the minimum number of queens (or other pieces) needed to attack or occupy every square. For n=8 the queen's domination number is 5. write a predicate ...
Queens Domination Queens Domination prolog n-queens Queens Domination Queens Domination Queen Domination Given an n×n board, the domination number is the minimum number of queens (or other pieces) needed to attack or occupy every square. For n=8 the queen's domination number is 5. write a predicate slution(N),to get th...
[ 0.0093994140625, -0.007476806640625, 0.0245361328125, 0.003997802734375, -0.016845703125, 0.0034942626953125, 0.020263671875, -0.01397705078125, 0.00015544891357421875, -0.03173828125, -0.0023040771484375, -0.006072998046875, -0.00701904296875, -0.00543212890625, -0.01336669921875, 0.0...
[ 44109, 7, 984, 91407, 502, 4867, 653, 944, 1755, 77878, 17676, 19, 45443, 70, 54, 14012, 83, 15440, 111, 41, 126371, 44841, 47, 52875, 707, 143414, 53, 11907, 108047, 1326, 1369, 1019, 33, 25, 1892, 33022, 1653, 2063, 67, 13584, 1363, ...
[ 0.225830078125, 0.1129150390625, 0.219970703125, 0.2763671875, 0.13720703125, 0.1661376953125, 0.114501953125, 0.1837158203125, 0.1588134765625, 0.027587890625, 0.15087890625, 0.1229248046875, 0.26123046875, 0.05242919921875, 0.2130126953125, 0.2255859375, 0.0621337890625, 0.205444...
embed
59709275_c0
59709275
prolog
0
Title: how to draw a search tree using trace in prolog Problem title: how to draw a search tree using trace in prolog Tags: trace, prolog Problem: how to draw a search tree using trace in prolog Code signals: trace, rabbit_owner, Call, _7256, _7472, _7458, _7464, _7470, _7476, Exit, lists:member, _7484, _7486, _7492, _...
how to draw a search tree using trace in prolog how to draw a search tree using trace in prolog trace prolog trace rabbit_owner Call _7256 _7472 _7458 _7464 _7470 _7476 Exit lists:member _7484 _7486 _7492 _7494 _7500 _7502 _7510 _7514 _7522 _7524 _7536 _7538 _7550 _7554 _7572 lists:append _7574 Fail how to draw a searc...
[ 0.01165771484375, 0.0216064453125, -0.0103759765625, 0.00102996826171875, -0.01043701171875, -0.00124359130859375, 0.00592041015625, 0.00494384765625, 0.001800537109375, -0.0201416015625, 0.01336669921875, -0.00848388671875, -0.016357421875, 0.00007963180541992188, 0.0164794921875, -0....
[ 3642, 79442, 33938, 53201, 17368, 144851, 23, 502, 4867, 10, 152131, 18, 8770, 1679, 26265, 127892, 139091, 304, 10057, 160775, 5757, 910, 5443, 217, 5303, 27417, 172025, 159645, 182434, 4283, 58087, 963, 2592, 2357, 8659, 10991, 12338, 16360...
[ 0.0478515625, 0.1851806640625, 0.20751953125, 0.265625, 0.061767578125, 0.2491455078125, 0.02734375, 0.11669921875, 0.185302734375, 0.0230865478515625, 0.09521484375, 0.05596923828125, 0.0982666015625, 0.03314208984375, 0.03387451171875, 0.1187744140625, 0.038818359375, 0.040710449...
embed
70950050_c1
70950050
prolog
1
0,file,open). tlb_button(1002):- system_menu(0,file,save). tlb_button(1003):- system_menu(0,file,save_as). ``` Code signals: How, Menu, WIN-PROLOG, known_focus, gfx_brush_create, window_handler, tlb_handler, wm_size, _S2, ws_child, ws_visible, bs_pushbutton, ws_clipsiblings, _S3, ws_clipchildren, Open, Save, Win, msg_p...
0,file,open). tlb_button(1002):- system_menu(0,file,save). tlb_button(1003):- system_menu(0,file,save_as). ``` Code signals: How, Menu, WIN-PROLOG, known_focus, gfx_brush_create, window_handler, tlb_handler, wm_size, _S2, ws_child, ws_visible, bs_pushbutton, ws_clipsiblings, _S3, ws_clipchildren, Open, Save, Win, msg_p...
[ 0.03173828125, 0.018310546875, 0.0032501220703125, 0.0146484375, 0.018310546875, 0.0279541015625, -0.0234375, 0.0001354217529296875, 0.01458740234375, -0.0189208984375, 0.019775390625, 0.0238037109375, 0.00372314453125, 0.0206298828125, 0.0284423828125, -0.006378173828125, 0.00732421...
[ 757, 29822, 59636, 194, 75137, 275, 8789, 1507, 90980, 101432, 5426, 30144, 2389, 108999, 108591, 162, 1135, 28864, 26073, 7, 11249, 49434, 108568, 47970, 47510, 51529, 3584, 11680, 706, 420, 425, 11911, 1495, 7612, 2182, 76896, 74258, 39, ...
[ 0.1319580078125, 0.194091796875, 0.1614990234375, 0.043701171875, 0.1282958984375, 0.16552734375, 0.166015625, 0.1376953125, 0.05462646484375, 0.1636962890625, 0.13232421875, 0.2225341796875, 0.06463623046875, 0.1624755859375, 0.160400390625, 0.1123046875, 0.0281524658203125, 0.234...
embed
26227962_c1
26227962
prolog
1
only the first match one and miss all the rest. It's more like calling: list1(a,X),member(X,[[b,a,b],[b,b,a],[a,a,a],[c,c,b]]). X = [b, a, b] ; X = [a, a, a] ; false. After find the fist match, it can only backtrack to find a second one. But how can I put all the backtrack result into one single output list? Can someb...
only the first match one and miss all the rest. It's more like calling: list1(a,X),member(X,[[b,a,b],[b,b,a],[a,a,a],[c,c,b]]). X = [b, a, b] ; X = [a, a, a] ; false. After find the fist match, it can only backtrack to find a second one. But how can I put all the backtrack result into one single output list? Can someb...
[ 0.01904296875, 0.00213623046875, 0.0142822265625, 0.017333984375, -0.0172119140625, 0.004852294921875, -0.00009202957153320312, 0.01226806640625, 0.032958984375, -0.02099609375, 0.016357421875, 0.013427734375, 0.00811767578125, 0.007080078125, -0.0015869140625, 0.006591796875, 0.0126...
[ 4734, 70, 5117, 14858, 1632, 136, 18025, 756, 10588, 1286, 1884, 159029, 5303, 418, 1542, 27417, 1193, 876, 98320, 7413, 809, 271, 442, 831, 4420, 125728, 17932, 3642, 3884, 16750, 3934, 11001, 140992, 4358, 28864, 26073, 77336, 1250, 4867,...
[ 0.0927734375, 0.0020751953125, 0.1146240234375, 0.2388916015625, 0.1121826171875, 0.0149383544921875, 0.187255859375, 0.07373046875, 0.06890869140625, 0.0682373046875, 0.047088623046875, 0.1805419921875, 0.2384033203125, 0.04718017578125, 0.0282440185546875, 0.1942138671875, 0.081176...
embed
46869175_c0
46869175
prolog
0
Title: Multiple &#x27;\=&#x27; [Prolog] Problem title: Multiple &#x27;\=&#x27; [Prolog] Tags: prolog Problem: Multiple '\=' [Prolog] How can I express the following conjunction more succinctly? condition(X1, X2, X3, X4, X5) :- X1 \= X2, X1 \= X3, X1 \= X4, X1 \= X5, X2 \= X3, X2 \= X4, X2 \= X5, X3 \= X4, X3 \= X5, X4 ...
Multiple &#x27;\=&#x27; [Prolog] Multiple &#x27;\=&#x27; [Prolog] prolog Multiple Prolog Multiple '\=' [Prolog] How can I express the following conjunction more succinctly? Ideally, I want to use a single goal of a built-in / library predicate.
[ 0.0064697265625, -0.0087890625, -0.00015163421630859375, 0.0064697265625, -0.009033203125, -0.010986328125, -0.00174713134765625, -0.005035400390625, 0.023681640625, -0.01043701171875, -0.0029449462890625, -0.00848388671875, 0.024169921875, 0.0093994140625, -0.01104736328125, 0.0151367...
[ 19335, 8705, 54764, 3768, 74, 41872, 1369, 10752, 4867, 502, 1250, 11249, 831, 36510, 25632, 158, 17043, 10763, 1286, 42593, 6333, 15390, 41143, 3444, 4527, 10, 11001, 69236, 88303, 73, 35773, 1294, 1653, 2063, 67 ]
[ 0.2271728515625, 0.2802734375, 0.0098876953125, 0.1517333984375, 0.0169525146484375, 0.1181640625, 0.1875, 0.1583251953125, 0.253173828125, 0.1680908203125, 0.199951171875, 0.011077880859375, 0.01007080078125, 0.1614990234375, 0.120849609375, 0.058837890625, 0.185302734375, 0.09167...
embed
16384471_c0
16384471
prolog
0
Title: Converting a string list to integer in swi prolog as shown Problem title: Converting a string list to integer in swi prolog as shown Tags: prolog, lambda Problem: Converting a string list to integer in swi prolog as shown How to convert a string list to integers? Eg: if the list is ['i','am','fine'], the result ...
Converting a string list to integer in swi prolog as shown Converting a string list to integer in swi prolog as shown prolog lambda Converting Converting a string list to integer in swi prolog as shown How to convert a string list to integers? Eg: if the list is ['i','am','fine'], the result should be [9,14,34] (i=9,am...
[ 0.000453948974609375, -0.0076904296875, -0.003326416015625, 0.0244140625, -0.01513671875, 0.01708984375, 0.006927490234375, 0.01519775390625, 0.0118408203125, -0.01336669921875, -0.0024871826171875, -0.021240234375, -0.011474609375, 0.0157470703125, -0.0035400390625, -0.0048828125, 0...
[ 1657, 814, 1916, 79315, 5303, 47, 892, 1505, 91, 2452, 502, 4867, 127887, 237, 6492, 85, 11249, 96760, 10, 26255, 2174, 83, 14, 302, 64552, 16750, 5608, 1126, 2592, 10289, 1328, 2681, 910, 131815, 121763, 54, 159, 38969, 1250 ]
[ 0.021484375, 0.126953125, 0.0181121826171875, 0.26220703125, 0.2379150390625, 0.1123046875, 0.1649169921875, 0.22119140625, 0.046600341796875, 0.1953125, 0.1268310546875, 0.1949462890625, 0.083251953125, 0.013153076171875, 0.1259765625, 0.0706787109375, 0.00787353515625, 0.18371582...
embed
40928669_c0
40928669
prolog
0
Title: Function in prolog with backtracking Problem title: Function in prolog with backtracking Tags: backtracking, predicate, prolog Problem: Function in prolog with backtracking The function is backtracking function f(n,k) or f(n, k) = n * k, if n = k = n ∗ f(n−1, k), if n > k = k ∗ f(n, k−1), if n < k The Prolog pre...
Function in prolog with backtracking Function in prolog with backtracking backtracking predicate prolog Function in prolog with backtracking The function is backtracking function f(n,k) or The Prolog predicate fn/3 assign in order to implement the above function Can you help me solve the above function? Thank you
[ 0.0123291015625, 0.01348876953125, 0.0233154296875, -0.016357421875, -0.0166015625, -0.01531982421875, 0.00811767578125, 0.0198974609375, -0.00787353515625, -0.0233154296875, 0.0213623046875, 0.00860595703125, -0.018310546875, -0.00726318359375, 0.01043701171875, -0.00421142578125, 0...
[ 28670, 10763, 23, 502, 4867, 678, 4420, 125728, 214, 1653, 2063, 32354, 1238, 19, 92, 1250, 67, 14783, 18113, 95486, 29479, 4358, 86869, 36917 ]
[ 0.186279296875, 0.0858154296875, 0.06005859375, 0.16357421875, 0.2445068359375, 0.1331787109375, 0.18603515625, 0.26123046875, 0.11236572265625, 0.140625, 0.18359375, 0.20703125, 0.092529296875, 0.07330322265625, 0.12646484375, 0.1641845703125, 0.0251312255859375, 0.14306640625, ...
embed
67247574_c0
67247574
prolog
0
Title: Why do both predicates get evaluated? Problem title: Why do both predicates get evaluated? Tags: swi-prolog, prolog Problem: Why do both predicates get evaluated? I have this predicate with two clauses: abs(X, Y) :- X < 0, Y is -X. abs(X, X) :- X >= 0. and I submit this to the interpreter: ?- abs(-5,W). W = 5 ; ...
Why do both predicates get evaluated? Why do both predicates get evaluated? swi-prolog prolog Why Why do both predicates get evaluated? I have this predicate with two clauses: and I submit this to the interpreter: Why does it evaluate the second clause and return false? Is there a way around that?
[ 0.007232666015625, 0.00439453125, 0.016357421875, 0.0025177001953125, -0.017822265625, 0.018798828125, 0.035888671875, 0.01470947265625, 0.01531982421875, 0.02685546875, 0.0067138671875, 0.00019741058349609375, -0.0152587890625, -0.00299072265625, 0.006439208984375, 0.01239013671875, ...
[ 44084, 54, 15044, 1653, 2063, 1636, 2046, 151575, 297, 2452, 3454, 4867, 502, 67, 6626, 70731, 137447, 29481, 56, 13, 17932, 30646, 98320, 10932 ]
[ 0.123291015625, 0.040130615234375, 0.161865234375, 0.166015625, 0.2164306640625, 0.11102294921875, 0.060516357421875, 0.2108154296875, 0.1300048828125, 0.1240234375, 0.0731201171875, 0.1048583984375, 0.06744384765625, 0.061309814453125, 0.052642822265625, 0.127197265625, 0.0591125488...
embed
77123189_c0
77123189
prolog
0
Title: Prolog task with multiple condition Problem title: Prolog task with multiple condition Tags: prolog Problem: Prolog task with multiple condition (e(),[],X). (m(X,D),[X|Xs],X) :- (D,Xs, X). (n(X,D),[X|Xs],Y) :- Y \= X, (D, Xs, Y). ?- (Desc,[1,2],2). Can someone explain me please how we normally do these type of t...
Prolog task with multiple condition Prolog task with multiple condition prolog Prolog Desc Prolog task with multiple condition Can someone explain me please how we normally do these type of tasks? Desc = n(1,m(2,e()) - that is the answer. But i don't understand, how we got it.
[ 0.0277099609375, 0.0177001953125, 0.0072021484375, 0.0126953125, 0.0062255859375, 0.023193359375, -0.009033203125, 0.0017547607421875, 0.0234375, -0.0296630859375, 0.0216064453125, -0.01092529296875, 0.003662109375, 0.005950927734375, -0.00921630859375, 0.0286865234375, 0.02502441406...
[ 1250, 4867, 66211, 678, 48716, 35431, 502, 68320, 22008, 73342, 163, 22936, 3642, 642, 3638, 538, 54, 6097, 10644, 111, 7, 2203, 653, 41600, 39, 54753, 13, 132, 70, 35166, 2301, 18, 28219, 4163, 442 ]
[ 0.17578125, 0.27734375, 0.25, 0.0927734375, 0.2366943359375, 0.28125, 0.1214599609375, 0.28466796875, 0.0160675048828125, 0.1446533203125, 0.0242767333984375, 0.04962158203125, 0.07916259765625, 0.059844970703125, 0.1407470703125, 0.02923583984375, 0.10986328125, 0.09185791015625, ...
embed
77664602_c1
77664602
prolog
1
,0,0,2,2,4,6,8,8,10,10,12,14,16,16,18,18,20,22,24,24,26,26,28,30,32,32,34,34,36,38]' So I assume I should convert every variable to a boolean expression, so that the sum of the sat count of those expressions equals to the number of valid solutions I get by using labeling/2 , but I'm not sure how. Code signals: CLP, SWI...
,0,0,2,2,4,6,8,8,10,10,12,14,16,16,18,18,20,22,24,24,26,26,28,30,32,32,34,34,36,38]' So I assume I should convert every variable to a boolean expression, so that the sum of the sat count of those expressions equals to the number of valid solutions I get by using labeling/2 , but I'm not sure how. Code signals: CLP, SWI...
[ 0.0093994140625, -0.01263427734375, 0.00017833709716796875, 0.0091552734375, -0.0004291534423828125, 0.03564453125, -0.00909423828125, 0.0115966796875, 0.03076171875, -0.004669189453125, -0.0208740234375, -0.02880859375, 0.01220703125, 0.0291748046875, 0.0093994140625, -0.0005264282226...
[ 63527, 304, 617, 4, 151664, 1019, 963, 1530, 2592, 2485, 1819, 1549, 4015, 2357, 4046, 3882, 1197, 6460, 10289, 8659, 10991, 268, 25, 41591, 5608, 96760, 11907, 77336, 47, 337, 31, 34677, 125195, 10554, 11736, 54529, 111, 8382, 105950, 14...
[ 0.1953125, 0.07763671875, 0.142822265625, 0.009552001953125, 0.1328125, 0.1141357421875, 0.0892333984375, 0.07763671875, 0.1131591796875, 0.1055908203125, 0.09991455078125, 0.097900390625, 0.0789794921875, 0.09735107421875, 0.1265869140625, 0.1181640625, 0.1060791015625, 0.10546875...
embed
9442767_c0
9442767
prolog
0
Title: Turbo Prolog&#x27;s &#x27;save&#x27; analogue in SWI-Prolog Problem title: Turbo Prolog&#x27;s &#x27;save&#x27; analogue in SWI-Prolog Tags: fact, turbo-prolog, swi-prolog, save, prolog Problem: Turbo Prolog's 'save' analogue in SWI-Prolog Is there any SWI's analogue for Turbo's save function, which saves into a...
Turbo Prolog&#x27;s &#x27;save&#x27; analogue in SWI-Prolog Turbo Prolog&#x27;s &#x27;save&#x27; analogue in SWI-Prolog fact turbo-prolog swi-prolog save prolog Turbo Prolog SWI-Prolog Turbo Prolog's 'save' analogue in SWI-Prolog Is there any SWI's analogue for Turbo's save function, which saves into a file facts, prev...
[ 0.036376953125, 0.022705078125, 0.0274658203125, 0.026123046875, -0.02197265625, -0.01513671875, -0.0189208984375, 0.014404296875, 0.0145263671875, -0.016845703125, 0.0010528564453125, 0.032958984375, -0.0087890625, -0.00075531005859375, 0.0177001953125, -0.002838134765625, 0.0084228...
[ 102228, 1250, 4867, 3768, 108999, 60223, 13388, 159, 38969, 10752, 15824, 94779, 3454, 2452, 30098, 502, 2499, 32354, 3934, 11435, 198395, 72367, 1829, 75463, 114689, 237, 33657 ]
[ 0.263671875, 0.1563720703125, 0.221435546875, 0.044677734375, 0.2427978515625, 0.1485595703125, 0.1202392578125, 0.04388427734375, 0.189697265625, 0.132080078125, 0.19677734375, 0.235595703125, 0.119140625, 0.155517578125, 0.1971435546875, 0.098876953125, 0.012451171875, 0.16113281...
embed
42285782_c0
42285782
prolog
0
Title: SWI-Prolog: Return all values except one Problem title: SWI-Prolog: Return all values except one Tags: prolog Problem: SWI-Prolog: Return all values except one For the following SWI-Prolog program, I want to create a predicate that returns all values except a single one. For example, return all males except ahme...
SWI-Prolog: Return all values except one SWI-Prolog: Return all values except one prolog SWI-Prolog SWI-Prolog: Return all values except one For the following SWI-Prolog program, I want to create a predicate that returns all values except a single one. For example, return all males except ahmed . How can I do that?
[ 0.01275634765625, 0.0142822265625, -0.0198974609375, 0.00848388671875, -0.02587890625, 0.017822265625, 0.00396728515625, -0.0078125, -0.0035247802734375, -0.015625, 0.0169677734375, 0.006103515625, -0.0004749298095703125, -0.0181884765625, 0.0186767578125, 0.009521484375, 0.013122558...
[ 159, 38969, 9, 10752, 4867, 12, 173340, 756, 142424, 40494, 1632, 502, 25632, 1528, 3444, 28282, 1653, 2063, 67, 450, 30646, 7, 11001, 27781, 11280, 1263, 4806, 11249, 831, 54 ]
[ 0.09521484375, 0.2587890625, 0.037750244140625, 0.1844482421875, 0.2425537109375, 0.01617431640625, 0.2352294921875, 0.134521484375, 0.2156982421875, 0.168701171875, 0.1220703125, 0.154052734375, 0.06866455078125, 0.166015625, 0.10711669921875, 0.1533203125, 0.169921875, 0.22863769...
embed
14857045_c0
14857045
prolog
0
Title: Equation solver in SWI-Prolog Problem title: Equation solver in SWI-Prolog Tags: clpq, prolog Problem: Equation solver in SWI-Prolog I want to write a program in SWI-Prolog that solves equations. I know GNU Prolog and that makes me nervous... What is wrong here? equation(X1,X2) :- { 2*X1 + 3*X2 =:= 6, {X1 is 0; ...
Equation solver in SWI-Prolog Equation solver in SWI-Prolog clpq prolog Equation SWI-Prolog GNU Prolog Equation solver in SWI-Prolog I want to write a program in SWI-Prolog that solves equations. I know GNU Prolog and that makes me nervous... What is wrong here? X1 and X2 always equal to 0 or 1 .
[ 0.0169677734375, 0.00787353515625, -0.0017852783203125, 0.007476806640625, -0.0086669921875, 0.00665283203125, 0.00836181640625, -0.004791259765625, 0.00201416015625, -0.0185546875, 0.002960205078125, 0.0224609375, -0.005584716796875, -0.004302978515625, 0.01123046875, 0.0155029296875,...
[ 241, 5490, 2320, 3115, 814, 23, 159, 38969, 9, 10752, 4867, 864, 502, 165132, 1250, 3444, 33022, 1528, 86869, 7, 28, 13722, 5256, 3714, 30482, 11066, 13048, 44691, 3688, 1193, 418, 136, 304, 11343, 105950, 47, 757, 707, 106 ]
[ 0.029327392578125, 0.198486328125, 0.010986328125, 0.1375732421875, 0.1494140625, 0.05975341796875, 0.0977783203125, 0.2435302734375, 0.0255279541015625, 0.13427734375, 0.2144775390625, 0.0634765625, 0.0919189453125, 0.2032470703125, 0.140380859375, 0.028594970703125, 0.080078125, ...
embed
33319922_c0
33319922
prolog
0
Title: subtract but give parameter, which should not be deleted Problem title: subtract but give parameter, which should not be deleted Tags: prolog, list Problem: subtract but give parameter, which should not be deleted I want to use the predicate subtract to remove all list items that are not lists. Sample query show...
subtract but give parameter, which should not be deleted subtract but give parameter, which should not be deleted prolog list subtract but give parameter, which should not be deleted I want to use the predicate subtract to remove all list items that are not lists. Sample query showing the expected answer: How can I do ...
[ -0.0211181640625, 0.01434326171875, 0.0167236328125, 0.005645751953125, -0.0301513671875, 0.01409912109375, 0.000560760498046875, 0.004425048828125, 0.015869140625, -0.0361328125, 0.0002460479736328125, -0.00121307373046875, -0.009033203125, 0.0203857421875, -0.0086669921875, -0.003417...
[ 1614, 39989, 18, 1284, 8337, 171859, 3129, 5608, 959, 154109, 71, 502, 4867, 5303, 3444, 4527, 1653, 2063, 67, 47, 87388, 756, 55769, 450, 621, 33209, 84751, 54 ]
[ 0.1663818359375, 0.199951171875, 0.1160888671875, 0.1531982421875, 0.1851806640625, 0.2412109375, 0.0234832763671875, 0.1158447265625, 0.142822265625, 0.16357421875, 0.0290985107421875, 0.112060546875, 0.176025390625, 0.16015625, 0.0775146484375, 0.074951171875, 0.0843505859375, 0....
embed
22544313_c0
22544313
prolog
0
Title: prolog not all the same Problem title: prolog not all the same Tags: logic, prolog Problem: prolog not all the same Hi I am new to prolog and I want to know how to express "not all the same" logically in prolog. for example, if I have a function valid(A, B, C, D) that takes numbers as input and requires A B C D ...
prolog not all the same prolog not all the same logic prolog prolog not all the same Hi I am new to prolog and I want to know how to express "not all the same" logically in prolog. for example, if I have a function valid(A, B, C, D) that takes numbers as input and requires A B C D are not all the same, how do I state i...
[ -0.0126953125, -0.00958251953125, 0.020751953125, 0.009765625, 0.0048828125, 0.00156402587890625, -0.0252685546875, -0.004241943359375, 0.01611328125, 0.006988525390625, 0.01348876953125, 0.00775146484375, 0.02490234375, 0.0224609375, 0.0031585693359375, 0.00159454345703125, -0.01367...
[ 502, 4867, 959, 756, 70, 5701, 62775, 3525, 3444, 3714, 3642, 36510, 10869, 12684, 71407, 23, 32354, 35604, 284, 335, 313, 391, 51776, 101935, 107730, 144570, 62, 621, 11341, 442, 37842, 69112, 20697 ]
[ 0.1849365234375, 0.2420654296875, 0.185791015625, 0.1607666015625, 0.075927734375, 0.178466796875, 0.1759033203125, 0.0303955078125, 0.02880859375, 0.0222930908203125, 0.01287841796875, 0.149169921875, 0.220947265625, 0.10986328125, 0.0875244140625, 0.034759521484375, 0.15087890625, ...
embed
4860459_c0
4860459
prolog
0
Title: Separate list A/B -&gt; B swi-prolog Problem title: Separate list A/B -&gt; B swi-prolog Tags: prolog, list Problem: Separate list A/B -> B swi-prolog I have a List [2/ 4 ,3/ 6 ,1/ 2 ,7/ 5 ] and I want to create a list consisting of only second numbers [ 4 , 6 , 2 , 5 ]. I was thinking something like this: newli...
Separate list A/B -&gt; B swi-prolog Separate list A/B -&gt; B swi-prolog prolog list Separate Separate list A/B -> B swi-prolog I have a List [2/ 4 ,3/ 6 ,1/ 2 ,7/ 5 ] and I want to create a list consisting of only second numbers [ 4 , 6 , 2 , 5 ]. I was thinking something like this: That didn't work, any suggestions?
[ 0.015380859375, -0.006866455078125, 0.016357421875, 0.002227783203125, -0.0274658203125, 0.015625, -0.006134033203125, 0.02392578125, 0.0191650390625, 0.01300048828125, 0.001739501953125, -0.00677490234375, 0.0140380859375, -0.005218505859375, -0.009033203125, -0.0078125, 0.027832031...
[ 503, 6276, 67, 5303, 62, 64, 571, 1230, 5386, 335, 2452, 3454, 4867, 91, 502, 33079, 87, 765, 10, 32036, 45792, 201, 40061, 305, 50412, 116, 966, 190, 3444, 47, 28282, 58055, 4734, 17932, 101935, 47644, 1884, 903, 9925, 15935, 18, 448...
[ 0.08563232421875, 0.2254638671875, 0.13525390625, 0.257568359375, 0.0477294921875, 0.1312255859375, 0.1494140625, 0.005889892578125, 0.14404296875, 0.1341552734375, 0.19580078125, 0.13427734375, 0.181396484375, 0.001220703125, 0.12353515625, 0.040374755859375, 0.000335693359375, 0....
embed
23524941_c0
23524941
prolog
0
Title: What exactly is member(b,X)? Problem title: What exactly is member(b,X)? Tags: prolog Problem: What exactly is member(b,X)? Today I came across this query: ?- member(b,X). The program was: member(X,[X|_]). member(X,[_|T]) :- member(X,T), !. When I ran the query, I got these answers: ?- member(b,X). X = [b|_G1560...
What exactly is member(b,X)? What exactly is member(b,X)? prolog What _G1560 _G1559 _G1563 What exactly is member(b,X)? Today I came across this query: The program was: When I ran the query, I got these answers: What exactly is that? What does this query do?
[ 0.010986328125, 0.00872802734375, 0.0218505859375, 0.00168609619140625, -0.01708984375, 0.02392578125, 0.0072021484375, 0.00457763671875, 0.004608154296875, -0.022216796875, 0.0274658203125, 0.0011138916015625, 0.00885009765625, 0.007171630859375, 0.0028839111328125, -0.01202392578125,...
[ 4865, 66161, 83, 32786, 275, 4, 1542, 132, 16, 502, 4867, 724, 1837, 4598, 12975, 15748, 36880, 41, 1294, 1528, 35166, 450, 14602, 903, 54 ]
[ 0.102783203125, 0.16455078125, 0.117431640625, 0.271728515625, 0.1861572265625, 0.0682373046875, 0.171142578125, 0.0477294921875, 0.0390625, 0.06201171875, 0.128662109375, 0.00299072265625, 0.064208984375, 0.1448974609375, 0.118408203125, 0.1356201171875, 0.002899169921875, 0.09729...
embed
58655738_c0
58655738
prolog
0
Title: Unification of terms in Prolog Problem title: Unification of terms in Prolog Tags: prolog, unification Problem: Unification of terms in Prolog I have the follow terms : T1 = f(f(3,Z,2),f(I,Z,G),Z) T2 = f(F,f(R,f(5,2),D),f(3,2,F)) I have to unify that terms. My idea is: G=(3,Z,2) I=(5,2) I=(3,2,F) I know how to u...
Unification of terms in Prolog Unification of terms in Prolog prolog unification Unification Prolog Unification of terms in Prolog I have the follow terms : I have to unify that terms. My idea is: I know how to unify in simple examples. Anyone that can shed some light on this one for me ? Thanks
[ 0.02392578125, 0.0225830078125, 0.0003070831298828125, 0.01361083984375, -0.00469970703125, -0.007232666015625, -0.019775390625, 0.01409912109375, -0.01116943359375, -0.019287109375, 0.00445556640625, 0.0005035400390625, 0.0024261474609375, 0.00628662109375, -0.0026397705078125, 0.0100...
[ 992, 41274, 69407, 23, 1250, 4867, 111, 502, 51, 28960, 765, 47, 40383, 6528, 3714, 3642, 8781, 27781, 67175, 22729 ]
[ 0.1728515625, 0.16845703125, 0.25341796875, 0.050994873046875, 0.156982421875, 0.247314453125, 0.0074615478515625, 0.1241455078125, 0.155517578125, 0.1571044921875, 0.042205810546875, 0.0230560302734375, 0.1715087890625, 0.0518798828125, 0.04937744140625, 0.040374755859375, 0.0523376...
embed
23644500_c0
23644500
prolog
0
Title: Print a value from a fact in Prolog? Problem title: Print a value from a fact in Prolog? Tags: prolog Problem: Print a value from a fact in Prolog? Let's say I have these facts: champion(Real_Madrid). second_place(Atl). How do I print the "Real_Madrid" string value from a query in Prolog so I can say for example...
Print a value from a fact in Prolog? Print a value from a fact in Prolog? prolog a Print Prolog Real_Madrid second_place Atl Print a value from a fact in Prolog? Let's say I have these facts: How do I print the "Real_Madrid" string value from a query in Prolog so I can say for example: Champions(Something). Real_Madrid...
[ 0.01007080078125, -0.0086669921875, 0.0030670166015625, 0.01226806640625, 0.00007677078247070312, 0.01385498046875, -0.0033721923828125, -0.003997802734375, -0.0015411376953125, -0.01153564453125, -0.002960205078125, -0.00109100341796875, -0.0235595703125, -0.006378173828125, -0.02001953...
[ 39754, 10, 34292, 1295, 15824, 23, 1250, 4867, 502, 5120, 63129, 19040, 17932, 23935, 1913, 141, 11249, 28412, 68996, 79315, 41, 49838, 64113 ]
[ 0.2322998046875, 0.0304107666015625, 0.195068359375, 0.133544921875, 0.2025146484375, 0.07476806640625, 0.1578369140625, 0.24755859375, 0.080322265625, 0.190185546875, 0.1158447265625, 0.1600341796875, 0.0875244140625, 0.1046142578125, 0.04498291015625, 0.038177490234375, 0.032806396...
embed
27215697_c0
27215697
prolog
0
Title: Prolog - tracing a rule Problem title: Prolog - tracing a rule Tags: prolog Problem: Prolog - tracing a rule Considering the following rules: example(A, [A|As], As). example(A, [B|Bs], [B|Cs]) :- what(A, Bs, Cs). and the query: example(c, [a, b, c, a], X). results: X = [ a, b, a ] Can anyone help me trace how it...
Prolog - tracing a rule Prolog - tracing a rule prolog Prolog Prolog - tracing a rule Considering the following rules: and the query: results: Can anyone help me trace how it does this? I am unsure what example it goes into first and I'm sure I can figure it out from there.
[ 0.0235595703125, 0.01324462890625, -0.006805419921875, 0.0166015625, -0.006927490234375, 0.0162353515625, -0.016357421875, 0.01202392578125, -0.005767822265625, -0.0247802734375, 0.00003647804260253906, -0.0162353515625, -0.022705078125, -0.004058837890625, 0.01019287109375, 0.01116943...
[ 1250, 4867, 1152, 21896, 10, 79986, 502, 137399, 25632, 91736, 41, 1294, 50339, 4171, 35672, 4358, 163, 144851, 3642, 442, 14602, 903, 51646, 27781, 60899, 3934, 5117, 9077, 26366 ]
[ 0.16162109375, 0.244384765625, 0.2139892578125, 0.1524658203125, 0.049530029296875, 0.196533203125, 0.08648681640625, 0.054779052734375, 0.062347412109375, 0.177490234375, 0.1595458984375, 0.1546630859375, 0.246337890625, 0.0255889892578125, 0.01361846923828125, 0.06842041015625, 0.0...
embed
57279200_c0
57279200
prolog
0
Title: How does the length of list predicate work Problem title: How does the length of list predicate work Tags: list, prolog Problem: How does the length of list predicate work I know there are some topics already about this. But I still dont get it. Could be somebody describe step by step how: length1([],0). length1...
How does the length of list predicate work How does the length of list predicate work list prolog How length1 How does the length of list predicate work I know there are some topics already about this. But I still dont get it. Could be somebody describe step by step how: works? I put traces on but I still have no idea....
[ 0.0019683837890625, 0.0172119140625, -0.00110626220703125, 0.006011962890625, 0.00058746337890625, -0.0086669921875, 0.0174560546875, 0.01373291015625, 0.015869140625, -0.05419921875, 0.006805419921875, -0.0162353515625, -0.0022430419921875, 0.01263427734375, 0.0250244140625, -0.001342...
[ 11249, 14602, 70, 140909, 111, 5303, 1653, 2063, 67, 4488, 502, 4867, 418, 28451, 21771, 903, 7464, 13319, 2046, 442, 191147, 176256, 98363, 29954, 3642, 43240, 144851, 765, 110, 6528 ]
[ 0.128173828125, 0.08880615234375, 0.08001708984375, 0.224609375, 0.098388671875, 0.2216796875, 0.18310546875, 0.2139892578125, 0.14404296875, 0.163818359375, 0.1102294921875, 0.14453125, 0.0296478271484375, 0.01158905029296875, 0.0217437744140625, 0.020111083984375, 0.023712158203125...
embed
74071216_c1
74071216
prolog
1
,Ans). incr(f0(X),f1(X)). % Question 2 legal(f0(null)). legal(X) :- legal(A), incr(A,X). % Question 3 incrR(X,Y) :- legal(X), incr(X,Y). % Question 4 add(f0(null),X,X). add(P1,P2,P3) :- incrR(A,P1), incrR(B,P3), add(A,P2,B). I've been struggling with this for a few days and haven't found anything to help me online, so ...
,Ans). incr(f0(X),f1(X)). % Question 2 legal(f0(null)). legal(X) :- legal(A), incr(A,X). % Question 3 incrR(X,Y) :- legal(X), incr(X,Y). % Question 4 add(f0(null),X,X). add(P1,P2,P3) :- incrR(A,P1), incrR(B,P3), add(A,P2,B). I've been struggling with this for a few days and haven't found anything to help me online, so ...
[ 0.017333984375, 0.0013580322265625, 0.01171875, 0.0322265625, -0.00122833251953125, 0.01806640625, -0.0079345703125, -0.0230712890625, -0.00115203857421875, -0.0302734375, 0.005828857421875, 0.0036468505859375, -0.015380859375, 0.0218505859375, 0.0174560546875, -0.0140380859375, 0.00...
[ 4, 7251, 7, 194, 23, 23150, 132, 420, 2389, 1542, 418, 1745, 68185, 116, 8437, 139550, 15772, 284, 138, 1052, 1723, 201, 15190, 683, 304, 21320, 17727, 571, 237875, 678, 903, 4358, 1118, 26458, 256, 1108, 53, 28541, 28864, 26073, 54092,...
[ 0.03228759765625, 0.1461181640625, 0.09521484375, 0.052093505859375, 0.103759765625, 0.179931640625, 0.00531005859375, 0.04339599609375, 0.10015869140625, 0.10015869140625, 0.03466796875, 0.05535888671875, 0.218994140625, 0.0770263671875, 0.1783447265625, 0.1370849609375, 0.073181152...
embed
24352700_c1
24352700
prolog
1
(it is correct): range(From, From, [From]):- true, !. range(From, To, [From|Ls]):- From < To, From2 is From+1, range(From2, To, Ls). I know this is probably not the best solution but I could use some help understanding what went wrong here. Code signals: Prolog, N-Queens, Sol, no_threat, Queen1, Queen2, Dist, Queen2-Q...
(it is correct): range(From, From, [From]):- true, !. range(From, To, [From|Ls]):- From < To, From2 is From+1, range(From2, To, Ls). I know this is probably not the best solution but I could use some help understanding what went wrong here. Code signals: Prolog, N-Queens, Sol, no_threat, Queen1, Queen2, Dist, Queen2-Q...
[ -0.010009765625, 0.0179443359375, 0.004150390625, -0.01513671875, -0.0123291015625, 0.017822265625, -0.01300048828125, 0.0035400390625, 0.0035858154296875, -0.0235595703125, 0.004638671875, 0.03076171875, -0.00142669677734375, 0.002105712890625, -0.0028228759765625, -0.0064697265625, ...
[ 217, 83, 26785, 2077, 37457, 132, 168407, 4, 28090, 29568, 711, 717, 866, 7, 4426, 304, 21748, 339, 31895, 2965, 29806, 4358, 100094, 23409, 44691, 3688, 28864, 26073, 1250, 4867, 541, 41732, 1755, 6678, 110, 1283, 44109, 418, 6206, 18, ...
[ 0.003387451171875, 0.04461669921875, 0.1505126953125, 0.0246429443359375, 0.29833984375, 0.037139892578125, 0.263427734375, 0.0199432373046875, 0.260986328125, 0.1993408203125, 0.0849609375, 0.1962890625, 0.08245849609375, 0.078125, 0.1220703125, 0.1436767578125, 0.167236328125, 0....
embed
49960936_c0
49960936
prolog
0
Title: how can I delete the command history in swi-prolog Problem title: how can I delete the command history in swi-prolog Tags: command-line, history, swi-prolog, prolog-toplevel, prolog Problem: how can I delete the command history in swi-prolog So, I enjoy the option of using the up and down arrow keys to search th...
how can I delete the command history in swi-prolog how can I delete the command history in swi-prolog command-line history swi-prolog prolog-toplevel prolog how can I delete the command history in swi-prolog So, I enjoy the option of using the up and down arrow keys to search through the command history in Swi-Prolog i...
[ -0.0050048828125, 0.02490234375, 0.0107421875, 0.0157470703125, -0.004669189453125, -0.006378173828125, 0.016845703125, -0.01226806640625, 0.00130462646484375, -0.033447265625, 0.00823974609375, 0.01275634765625, 0.00007486343383789062, 0.00180816650390625, 0.00946044921875, -0.0079956...
[ 3642, 831, 154109, 70, 75101, 32692, 91, 2452, 3454, 4867, 2256, 502, 13784, 67919, 87, 23, 25225, 35829, 1257, 7565, 118201, 22799, 33938, 8305, 105432, 10752, 64457, 46280 ]
[ 0.03912353515625, 0.06329345703125, 0.24169921875, 0.05731201171875, 0.2283935546875, 0.199462890625, 0.0142822265625, 0.1739501953125, 0.1126708984375, 0.2105712890625, 0.0728759765625, 0.0826416015625, 0.0195770263671875, 0.12890625, 0.002288818359375, 0.014678955078125, 0.05358886...
embed
36271978_c0
36271978
prolog
0
Title: nested list in comp Problem title: nested list in comp Tags: prolog Problem: nested list in comp I am trying to modify my list from [a, (a s b), ( a s b s c), a] to [[a], [a, b], [a,b,c], [a]] I tried sth like that: :- op(300, xfy, s). lol([], List). lol([X|T], List) :- X \=(A s B), lol(T, [[X]|List]). lol([X s ...
nested list in comp nested list in comp prolog List _G4165 nested list in comp I am trying to modify my list from [a, (a s b), ( a s b s c), a] to [[a], [a, b], [a,b,c], [a]] I tried sth like that: but this makes:
[ -0.01092529296875, 0.005218505859375, 0.0031585693359375, 0.006195068359375, -0.002288818359375, 0.03564453125, 0.0025787353515625, 0.0035858154296875, 0.00872802734375, -0.0252685546875, 0.004180908203125, -0.0019989013671875, -0.006927490234375, 0.0133056640625, 0, 0.0008811950683593...
[ 8512, 71, 5303, 23, 9969, 502, 4867, 32036, 724, 617, 118913, 31577, 47, 2811, 40383, 759, 1295, 11, 91, 876, 247, 10, 501, 275, 238, 37842, 927, 1884, 450, 1284, 903, 30482 ]
[ 0.27392578125, 0.160400390625, 0.230712890625, 0.0989990234375, 0.2283935546875, 0.1474609375, 0.207275390625, 0.16552734375, 0.027374267578125, 0.06268310546875, 0.1756591796875, 0.11651611328125, 0.088134765625, 0.1708984375, 0.1331787109375, 0.0484619140625, 0.12310791015625, 0....
embed
64130788_c0
64130788
prolog
0
Title: Prolog set a list based on query values Problem title: Prolog set a list based on query values Tags: prolog Problem: Prolog set a list based on query values Is there a way to get a list by results of a query? eg: getPairs(x,y):- v1(x), v2(y); v11(x), v22(y). v1(10). v2(20). v11(12). v22(22). then how can i use g...
Prolog set a list based on query values Prolog set a list based on query values prolog Prolog v11 v22 Prolog set a list based on query values Is there a way to get a list by results of a query? eg: then how can i use getPairs to make a list of pairs that I could then feed into another query
[ 0.01611328125, 0.01446533203125, -0.0021514892578125, -0.006988525390625, -0.01043701171875, 0.00592041015625, -0.0299072265625, -0.01031494140625, 0.01214599609375, -0.022705078125, 0.004425048828125, 0.002471923828125, -0.010986328125, -0.02880859375, -0.00604248046875, 0.00558471679...
[ 1250, 4867, 5423, 5303, 35509, 98, 41, 1294, 142424, 10, 502, 81, 1662, 4015, 3917, 47, 2046, 390, 50339, 111, 8335, 481, 7, 3249, 80836, 61590, 3934 ]
[ 0.1759033203125, 0.2626953125, 0.1685791015625, 0.26513671875, 0.163818359375, 0.09765625, 0.151611328125, 0.16943359375, 0.2470703125, 0.06414794921875, 0.11456298828125, 0.04351806640625, 0.1522216796875, 0.158935546875, 0.050750732421875, 0.006076812744140625, 0.08343505859375, ...
embed
7490116_c0
7490116
prolog
0
Title: Prolog List question Problem title: Prolog List question Tags: frames, prolog, list, apache-flex Problem: Prolog List question I am working with flex and there I have a frame called university and it has about 100 instances. I would like to store them in a list which is part of Prolog not Ksl and perform search ...
Prolog List question Prolog List question frames prolog list apache-flex Prolog List Prolog List question I am working with flex and there I have a frame called university and it has about 100 instances. I would like to store them in a list which is part of Prolog not Ksl and perform search operations. eg. the list sho...
[ 0.0361328125, -0.00069427490234375, -0.00579833984375, -0.01202392578125, -0.021728515625, -0.00909423828125, 0.00958251953125, 0.0107421875, 0.01251220703125, -0.037353515625, 0.00160980224609375, -0.0233154296875, 0.0027618408203125, -0.033935546875, -0.01385498046875, -0.00570678710...
[ 1250, 4867, 32036, 9655, 2674, 90, 502, 5303, 2241, 1430, 44289, 20697, 678, 123789, 35839, 152363, 1556, 1672, 805, 110527, 2806, 1884, 4343, 2856, 23, 2831, 959, 341, 24861, 51339, 33938, 41018, 5608, 70541, 4734, 141626, 31913, 4602, 454...
[ 0.1766357421875, 0.26025390625, 0.223388671875, 0.143798828125, 0.17626953125, 0.0357666015625, 0.130126953125, 0.2257080078125, 0.113525390625, 0.1038818359375, 0.2271728515625, 0.08233642578125, 0.0172271728515625, 0.225830078125, 0.0091552734375, 0.2010498046875, 0.032806396484375...
embed
65180949_c2
65180949
prolog
2
|T],Hits,Result):-check_how_many(H,[H|T],N),check(T,P,_),N>=P,Hits is N,add(H,[],Result). check([H|T],Hits,Result):-check_how_many(H,[H|T],N),check(T,P,Temp),Hits is P,add(Temp,[],Result). check_how_many(X,[X],1). check_how_many(_,[_],0). check_how_many(Pattern,[H|T],Hits):-same(Pattern,H),check_how_many(Pattern,T,P),H...
|T],Hits,Result):-check_how_many(H,[H|T],N),check(T,P,_),N>=P,Hits is N,add(H,[],Result). check([H|T],Hits,Result):-check_how_many(H,[H|T],N),check(T,P,Temp),Hits is P,add(Temp,[],Result). check_how_many(X,[X],1). check_how_many(_,[_],0). check_how_many(Pattern,[H|T],Hits):-same(Pattern,H),check_how_many(Pattern,T,P),H...
[ -0.003326416015625, 0.008056640625, 0.009521484375, 0.0115966796875, -0.02099609375, -0.000186920166015625, -0.01611328125, -0.0034942626953125, 0.0211181640625, -0.031982421875, 0.020263671875, -0.0103759765625, 0.0206298828125, 0.0130615234375, -0.009033203125, -0.00457763671875, 0...
[ 58745, 618, 268, 841, 14481, 4332, 7, 7136, 2077, 9, 78292, 47251, 669, 53, 839, 683, 2740, 83, 541, 4028, 12765, 4, 159065, 436, 1542, 17727, 77495, 8335, 3055, 40175, 21748, 28864, 26073, 12, 17006, 1250, 4867, 89536, 8705, 2684, 277,...
[ 0.060394287109375, 0.089599609375, 0.0311431884765625, 0.1649169921875, 0.1981201171875, 0.108154296875, 0.1170654296875, 0.1912841796875, 0.05657958984375, 0.0204010009765625, 0.2216796875, 0.1123046875, 0.16259765625, 0.144775390625, 0.0693359375, 0.056884765625, 0.039642333984375,...
embed
39591888_c1
39591888
prolog
1
very easy: composite(N) :- I #>= J, J #> 1, N #= I*J. Basically: “ N is composite if it can be written as I*J with I >= J > 1 ”. I am still unable to “negate” those constraints. I have tried using things like #==> (implies) but this doesn't seem to be implification at all! N #= I*J #==> J #= 1 will work for composite ...
very easy: composite(N) :- I #>= J, J #> 1, N #= I*J. Basically: “ N is composite if it can be written as I*J with I >= J > 1 ”. I am still unable to “negate” those constraints. I have tried using things like #==> (implies) but this doesn't seem to be implification at all! N #= I*J #==> J #= 1 will work for composite ...
[ -0.0322265625, -0.004913330078125, 0.010498046875, 0.0225830078125, 0.01409912109375, 0.03076171875, 0.00830078125, -0.004638671875, 0.0205078125, 0.0019683837890625, -0.0274658203125, 0.0137939453125, 0.003204345703125, 0.01708984375, -0.0030975341796875, 0.008056640625, 0.009704589...
[ 4552, 23468, 375, 77087, 13, 132, 839, 15772, 87, 468, 2740, 1369, 821, 106, 541, 1639, 1375, 12506, 83, 2174, 831, 59121, 237, 678, 977, 7464, 51, 2886, 3331, 67, 158, 2816, 4288, 37842, 17368, 69112, 116120, 3387, 41274, 1221, 4488, ...
[ 0.06927490234375, 0.1470947265625, 0.1788330078125, 0.264892578125, 0.1558837890625, 0.073486328125, 0.1663818359375, 0.04962158203125, 0.141845703125, 0.1414794921875, 0.144287109375, 0.06396484375, 0.2032470703125, 0.127685546875, 0.1829833984375, 0.102294921875, 0.199951171875, ...
embed
55785906_c0
55785906
prolog
0
Title: Writing Circle Area in ECLiPSe-CLP has Error Problem title: Writing Circle Area in ECLiPSe-CLP has Error Tags: prolog Problem: Writing Circle Area in ECLiPSe-CLP has Error I write a predicate for calculating Circle Area by EClipse-clp. circle(R) :- S is 3.14*R^2, write(S). it has following Error: calling an unde...
Writing Circle Area in ECLiPSe-CLP has Error Writing Circle Area in ECLiPSe-CLP has Error prolog Writing Circle Area ECLiPSe-CLP Error Writing Circle Area in ECLiPSe-CLP has Error I write a predicate for calculating Circle Area by EClipse-clp. it has following Error: calling an undefined procedure circle(R) :- S is 3.1...
[ 0.00135040283203125, -0.01123046875, 0.006500244140625, 0.0205078125, -0.01031494140625, 0.01336669921875, -0.004852294921875, 0.000057220458984375, -0.0166015625, 0.0035400390625, 0.0016021728515625, 0.033203125, -0.0084228515625, 0.00897216796875, 0.0301513671875, 0.0140380859375, ...
[ 213185, 163731, 79200, 23, 59947, 9506, 9059, 13, 9, 441, 37352, 1556, 212059, 502, 4867, 33022, 1653, 2063, 67, 74481, 95680, 238, 26775, 25632, 159029, 9232, 5983, 50491, 42154, 133, 1052, 15772, 159, 83, 1031, 2592, 661, 627, 8353, 304...
[ 0.197509765625, 0.2705078125, 0.2244873046875, 0.04266357421875, 0.091796875, 0.149658203125, 0.133544921875, 0.173583984375, 0.03277587890625, 0.058349609375, 0.2337646484375, 0.03204345703125, 0.226318359375, 0.1080322265625, 0.1651611328125, 0.164794921875, 0.1053466796875, 0.14...
embed
47744096_c0
47744096
prolog
0
Title: Prolog concatenate all elements inside a list to make a string? Problem title: Prolog concatenate all elements inside a list to make a string? Tags: list, prolog, string Problem: Prolog concatenate all elements inside a list to make a string? How would I concatenate all the elements in a list together in prolog?...
Prolog concatenate all elements inside a list to make a string? Prolog concatenate all elements inside a list to make a string? list prolog string Prolog Prolog concatenate all elements inside a list to make a string? How would I concatenate all the elements in a list together in prolog? I am trying to integrate it wit...
[ 0.0235595703125, -0.00836181640625, -0.00732421875, 0.0240478515625, -0.00531005859375, 0.03515625, 0.0054931640625, 0.01104736328125, -0.0025634765625, -0.024658203125, 0.002685546875, -0.041015625, -0.01025390625, -0.007293701171875, -0.011962890625, 0.0019989013671875, 0.006011962...
[ 1250, 4867, 158, 33478, 76, 67, 756, 80854, 46132, 5303, 47, 3249, 10, 79315, 502, 11249, 2806, 87, 70, 23, 25842, 78779, 43581, 32354, 140992, 107730, 11, 275, 71, 2203, 2055, 71574 ]
[ 0.1607666015625, 0.26513671875, 0.1219482421875, 0.1781005859375, 0.1485595703125, 0.1075439453125, 0.122802734375, 0.2047119140625, 0.1126708984375, 0.2099609375, 0.047576904296875, 0.0936279296875, 0.04779052734375, 0.25390625, 0.148193359375, 0.0704345703125, 0.07275390625, 0.02...
embed
53232117_c0
53232117
prolog
0
Title: SWI-Prolog how to reload workspace? Problem title: SWI-Prolog how to reload workspace? Tags: reload, prolog, workspace Problem: SWI-Prolog how to reload workspace? I am using standard editor that came with SWI-Prolog. I would like to reload workspace, so that all prior assertions and knowledge base would disappe...
SWI-Prolog how to reload workspace? SWI-Prolog how to reload workspace? reload prolog workspace SWI-Prolog SWI-Prolog how to reload workspace? I am using standard editor that came with SWI-Prolog. I would like to reload workspace, so that all prior assertions and knowledge base would disappear. Is there short cut for i...
[ 0.0125732421875, 0.0140380859375, 0.002197265625, 0.02294921875, -0.017822265625, 0.001068115234375, -0.000885009765625, 0.00176239013671875, -0.01202392578125, -0.0224609375, 0.0159912109375, 0.0027618408203125, -0.0294189453125, 0.01220703125, 0.03271484375, -0.0022125244140625, 0....
[ 159, 38969, 9, 10752, 4867, 3642, 47, 456, 63033, 4488, 65421, 502, 17368, 5570, 30391, 21449, 678, 2806, 1884, 756, 41928, 10, 16865, 136, 51359, 3647, 213566, 16610, 59226, 9077, 20903, 59636, 32195, 4271, 56 ]
[ 0.07916259765625, 0.2294921875, 0.035003662109375, 0.13818359375, 0.2271728515625, 0.0828857421875, 0.06878662109375, 0.14599609375, 0.257568359375, 0.1285400390625, 0.2293701171875, 0.1005859375, 0.0498046875, 0.135009765625, 0.1927490234375, 0.00592041015625, 0.00604248046875, 0....
embed
9886746_c0
9886746
prolog
0
Title: finding ALL sublist Problem title: finding ALL sublist Tags: prolog Problem: finding ALL sublist I wrote a predicate to find sublists: sublist([],[]). sublist([X|T], [X|TS]) :- sublist(T, TS). sublist([_|T], X) :- sublist(T, X). But it is not correct because it will fail for this: sublist([1,2,20,4,5,6],[1,2,4,2...
finding ALL sublist finding ALL sublist prolog ALL finding ALL sublist I wrote a predicate to find sublists: But it is not correct because it will fail for this: How to change this predicate to answer true. For that question without making time complexity much bigger?
[ -0.00007009506225585938, -0.0003261566162109375, 0.015869140625, -0.01300048828125, -0.0184326171875, 0.007598876953125, -0.005340576171875, 0.0130615234375, 0.0159912109375, -0.0086669921875, 0.0289306640625, -0.00335693359375, 0.01068115234375, 0.0093994140625, -0.002471923828125, 0....
[ 90791, 58837, 1614, 6562, 502, 4867, 54397, 1653, 2063, 67, 7413, 959, 26785, 1221, 35782, 15549, 47, 35166, 29568, 1733, 27140 ]
[ 0.138427734375, 0.1712646484375, 0.22705078125, 0.224365234375, 0.11004638671875, 0.142333984375, 0.0638427734375, 0.140380859375, 0.16650390625, 0.0860595703125, 0.11004638671875, 0.030242919921875, 0.11871337890625, 0.01004791259765625, 0.1600341796875, 0.150146484375, 0.0135803222...
embed
55839817_c1
55839817
prolog
1
3),jug(5,4),jug(8,1)],[jug(3,0),jug(5,4),jug(8,4)]] true . Which is the right path for the current jugs configuration. (I'll add a way to do with n jugs later) This is the way I would like it to show (in my code, you can see the index I want for each of them): ?- problem. 1 -> 2 2 -> 3 3 -> 1 2 -> 3 1 -> 2 2 -> 3 3 -> ...
3),jug(5,4),jug(8,1)],[jug(3,0),jug(5,4),jug(8,4)]] true . Which is the right path for the current jugs configuration. (I'll add a way to do with n jugs later) This is the way I would like it to show (in my code, you can see the index I want for each of them): ?- problem. 1 -> 2 2 -> 3 3 -> 1 2 -> 3 1 -> 2 2 -> 3 3 -> ...
[ -0.002532958984375, 0.0223388671875, 0.0034027099609375, 0.025634765625, -0.023193359375, 0.005828857421875, -0.0159912109375, 0.0067138671875, 0.0023040771484375, 0.00567626953125, 0.0037078857421875, -0.003265380859375, -0.0169677734375, 0.01165771484375, -0.004425048828125, 0.005218...
[ 8439, 461, 177, 104116, 29557, 206029, 128188, 247, 1019, 29568, 130078, 83, 70, 7108, 60875, 100, 43581, 103863, 7, 180346, 1181, 3917, 653, 14432, 3293, 2806, 1884, 442, 7639, 759, 18151, 831, 1957, 63262, 87, 3444, 12638, 111, 2856, 20...
[ 0.2174072265625, 0.226806640625, 0.191650390625, 0.1131591796875, 0.1915283203125, 0.2166748046875, 0.218994140625, 0.00689697265625, 0.1448974609375, 0.2191162109375, 0.019134521484375, 0.0239715576171875, 0.027587890625, 0.1580810546875, 0.26318359375, 0.047271728515625, 0.16589355...
embed
10431402_c0
10431402
prolog
0
Title: Prolog help removing or skipping an item whilst appending Problem title: Prolog help removing or skipping an item whilst appending Tags: prolog, logic, artificial-intelligence Problem: Prolog help removing or skipping an item whilst appending How do you skip a specific word if its part of a list and then append ...
Prolog help removing or skipping an item whilst appending Prolog help removing or skipping an item whilst appending prolog logic artificial-intelligence Prolog Prolog help removing or skipping an item whilst appending How do you skip a specific word if its part of a list and then append the rest? Usually this item is a...
[ 0.002716064453125, 0.01385498046875, 0.004547119140625, -0.002044677734375, -0.0184326171875, 0.01336669921875, 0.005218505859375, 0.0106201171875, 0.0169677734375, 0.00238037109375, 0.0169677734375, -0.017822265625, -0.0306396484375, 0.0007781982421875, 0.004608154296875, 0.0061340332...
[ 1250, 4867, 4358, 49146, 6496, 7158, 26783, 35735, 217982, 1747, 96819, 707, 502, 62775, 66733, 130687, 54, 398, 21658, 29458, 2565, 2174, 2831, 5303, 7068, 114689, 71, 10588, 62544, 99, 4034, 68018, 4488, 10932 ]
[ 0.15234375, 0.236572265625, 0.08709716796875, 0.1072998046875, 0.049346923828125, 0.157958984375, 0.0860595703125, 0.1531982421875, 0.07421875, 0.113037109375, 0.1514892578125, 0.0294647216796875, 0.11279296875, 0.150390625, 0.07098388671875, 0.0777587890625, 0.019927978515625, 0.0...
embed
34006366_c0
34006366
prolog
0
Title: writing context free grammar in prolog Problem title: writing context free grammar in prolog Tags: list, dcg, prolog, context-free-grammar Problem: writing context free grammar in prolog let's say I had the following context free grammar. S -> A A -> mAn A -> o How would this look in prolog? This is what I tried...
writing context free grammar in prolog writing context free grammar in prolog list dcg prolog context-free-grammar writing context free grammar in prolog let's say I had the following context free grammar. How would this look in prolog? This is what I tried but it doesn't work. The second line seems to be the issue.
[ 0.00531005859375, 0.00396728515625, 0.01123046875, 0.025634765625, -0.01116943359375, 0.0107421875, -0.0126953125, 0.014404296875, 0.021484375, -0.022216796875, 0.015625, -0.0137939453125, 0.00445556640625, 0.00144195556640625, 0.01385498046875, 0.0087890625, 0.016357421875, 0.0228...
[ 32562, 43701, 4092, 122092, 147, 23, 502, 4867, 5303, 177, 32087, 107415, 25632, 6713, 37842, 22027, 18, 4488, 17932, 13315, 31089 ]
[ 0.1484375, 0.188720703125, 0.1187744140625, 0.140625, 0.11212158203125, 0.0284576416015625, 0.12384033203125, 0.22021484375, 0.1221923828125, 0.038787841796875, 0.11724853515625, 0.10504150390625, 0.06890869140625, 0.08636474609375, 0.0478515625, 0.03375244140625, 0.0556640625, 0.0...
embed
67375050_c0
67375050
prolog
0
Title: Prolog Binary Numbers of length N Problem title: Prolog Binary Numbers of length N Tags: binary, list, prolog Problem: Prolog Binary Numbers of length N How i could create a predicate in order to enlist all possible combinations of binary numbers of length N? Example -> If length N = 3 then the output is L = [0,...
Prolog Binary Numbers of length N Prolog Binary Numbers of length N binary list prolog Prolog Binary Numbers Prolog Binary Numbers of length N How i could create a predicate in order to enlist all possible combinations of binary numbers of length N? Example -> If length N = 3 then the output is L = [0,0,0] L = [0,0,1] ...
[ 0.005035400390625, 0.01239013671875, 0.00933837890625, 0.01287841796875, 0.004913330078125, 0.033447265625, 0.0020751953125, -0.0029449462890625, 0.00994873046875, -0.0125732421875, -0.0208740234375, -0.0152587890625, 0.009765625, 0.0113525390625, 0.007537841796875, 0.02392578125, 0....
[ 1250, 4867, 54092, 103332, 140909, 541, 1294, 111, 2394, 6635, 5303, 502, 11249, 17, 5809, 28282, 10, 1653, 2063, 67, 12989, 22, 6562, 756, 7722, 162515, 101935, 89536, 138, 140992, 339, 2389, 63527, 76172, 206808, 98320 ]
[ 0.1949462890625, 0.2318115234375, 0.1986083984375, 0.1771240234375, 0.18994140625, 0.2066650390625, 0.007965087890625, 0.01806640625, 0.1982421875, 0.126953125, 0.14111328125, 0.1229248046875, 0.010162353515625, 0.041015625, 0.05523681640625, 0.150146484375, 0.02789306640625, 0.200...
embed
6164406_c0
6164406
prolog
0
Title: Input stream - closing Problem title: Input stream - closing Tags: inputstream, prolog, input Problem: Input stream - closing How to close an input stream in SWI-Prolog using <CTRL>+<D> combination ? bot:- repeat, write('>'), readln(X), nl, answer(X, Answer), write(Answer), nl, end(X). end(X):-member('end',X). W...
Input stream - closing Input stream - closing inputstream prolog input Input CTRL Answer Where Input stream - closing How to close an input stream in SWI-Prolog using <CTRL>+<D> combination ? How should I modify source code to get that result?
[ -0.006500244140625, 0.01361083984375, 0.017578125, -0.00238037109375, -0.0003452301025390625, -0.0018157958984375, 0.0111083984375, 0.01483154296875, 0.003631591796875, -0.0164794921875, 0.00543212890625, -0.0126953125, -0.00787353515625, 0.0033111572265625, 0.0198974609375, -0.0179443...
[ 360, 7077, 75973, 20450, 6953, 107730, 86429, 502, 4867, 71885, 30121, 130373, 78662, 47, 20903, 159, 38969, 10752, 17368, 43379, 1328, 397, 162515, 31344, 18151, 16750 ]
[ 0.1124267578125, 0.1802978515625, 0.248779296875, 0.18017578125, 0.1636962890625, 0.201171875, 0.197265625, 0.1109619140625, 0.193115234375, 0.07147216796875, 0.194580078125, 0.038818359375, 0.0584716796875, 0.02630615234375, 0.22119140625, 0.0504150390625, 0.2071533203125, 0.11700...
embed