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
14511856_c0
14511856
prolog
0
Title: How do I get the shortest list from all the unified options for a list variable in prolog? Problem title: How do I get the shortest list from all the unified options for a list variable in prolog? Tags: shortest-path, prolog, graph-theory Problem: How do I get the shortest list from all the unified options for a...
How do I get the shortest list from all the unified options for a list variable in prolog? How do I get the shortest list from all the unified options for a list variable in prolog? shortest-path prolog graph-theory all How Start End Path How do I get the shortest list from all the unified options for a list variable i...
[ 0.017822265625, 0.0021820068359375, 0.01239013671875, 0.008056640625, -0.0086669921875, -0.013427734375, 0.0113525390625, -0.025390625, 0.013916015625, -0.0286865234375, 0.00165557861328125, -0.001434326171875, -0.0012054443359375, 0.00799560546875, -0.0047607421875, 0.0225830078125, ...
[ 11249, 2046, 16610, 525, 5303, 1295, 51, 47314, 50717, 77336, 502, 4867, 756, 128405, 41382, 13794, 18878, 108421, 31577, 60875, 17721, 6626, 110, 53201, 1653, 2063, 126597, 152378, 683, 10519, 27430, 7722, 36439, 47, 70, 75457, 8305 ]
[ 0.034393310546875, 0.06927490234375, 0.2239990234375, 0.17431640625, 0.1763916015625, 0.0528564453125, 0.0704345703125, 0.1082763671875, 0.180908203125, 0.1763916015625, 0.11767578125, 0.207275390625, 0.0150909423828125, 0.1412353515625, 0.07080078125, 0.0841064453125, 0.111572265625...
embed
40987361_c2
40987361
prolog
2
--> n(NSem). nbar(NbarSem) --> nbar(NbarSem1),pp(PPSem), {var_replace(PPSem,PPSem1),beta(PPSem1@NbarSem1,NbarSem)}. nbar(NSem) --> n(NSem). pp(PPSem) --> pbar(PPSem). pbar(NbarSem) --> po(PPSem),np(NbarSem1), {var_replace(PPSem,PPSem1),beta(PPSem1@NbarSem1,NbarSem)}. isVerb(love). n(lbd(x,boy(x))) --> [boy]. n(lbd(x,g...
--> n(NSem). nbar(NbarSem) --> nbar(NbarSem1),pp(PPSem), {var_replace(PPSem,PPSem1),beta(PPSem1@NbarSem1,NbarSem)}. nbar(NSem) --> n(NSem). pp(PPSem) --> pbar(PPSem). pbar(NbarSem) --> po(PPSem),np(NbarSem1), {var_replace(PPSem,PPSem1),beta(PPSem1@NbarSem1,NbarSem)}. isVerb(love). n(lbd(x,boy(x))) --> [boy]. n(lbd(x,g...
[ 0.0028228759765625, 0.0240478515625, 0.003082275390625, 0.01507568359375, 0.0118408203125, 0.0198974609375, -0.00738525390625, 0.0089111328125, 0.01312255859375, -0.03271484375, 0.012939453125, 0.005462646484375, 0.010986328125, 0.0172119140625, 0.0030059814453125, -0.0003662109375, ...
[ 129908, 653, 22479, 195, 194, 1299, 839, 294, 17727, 6366, 17487, 1961, 107, 23935, 59865, 418, 981, 8152, 5, 32261, 915, 160, 83018, 132, 83, 15896, 275, 25003, 48543, 71, 425, 30885, 47313, 268, 28864, 26073, 12, 1250, 4867, 2994, 397...
[ 0.1422119140625, 0.161865234375, 0.15673828125, 0.27734375, 0.0771484375, 0.27978515625, 0.0875244140625, 0.1290283203125, 0.1026611328125, 0.1722412109375, 0.14892578125, 0.19873046875, 0.0986328125, 0.1875, 0.17724609375, 0.04046630859375, 0.02667236328125, 0.0013427734375, 0.0...
embed
5890195_c0
5890195
prolog
0
Title: Prolog: How to check if variable is initialized before use? Problem title: Prolog: How to check if variable is initialized before use? Tags: prolog, variables, initialization Problem: Prolog: How to check if variable is initialized before use? I have a code that looks like this: path(Node1, Node2, Distance):- ed...
Prolog: How to check if variable is initialized before use? Prolog: How to check if variable is initialized before use? prolog variables initialization Prolog How Node1 Node2 Distance Dist Prolog: How to check if variable is initialized before use? I have a code that looks like this: This rule will be called recursivel...
[ 0.02099609375, 0.01177978515625, 0.00074005126953125, 0.022705078125, 0.01708984375, -0.00518798828125, -0.015869140625, -0.01397705078125, 0.005462646484375, -0.01904296875, 0.0133056640625, -0.00020503997802734375, -0.0150146484375, -0.000308990478515625, 0.0196533203125, -0.00387573...
[ 1250, 4867, 11249, 12765, 2174, 77336, 61475, 29367, 8108, 4527, 83, 502, 438, 112, 418, 304, 154349, 329, 6206, 18, 18151, 33342, 79986, 35839, 195625, 5844, 217684, 9790, 11782, 18499, 74918, 56112, 129980, 44084, 123087, 29806 ]
[ 0.1409912109375, 0.2125244140625, 0.055084228515625, 0.2335205078125, 0.1112060546875, 0.278564453125, 0.230712890625, 0.1441650390625, 0.1324462890625, 0.0968017578125, 0.054473876953125, 0.11865234375, 0.1114501953125, 0.1005859375, 0.012359619140625, 0.0804443359375, 0.25024414062...
embed
2554009_c0
2554009
prolog
0
Title: Creating a 'remove member' function in prolog Problem title: Creating a 'remove member' function in prolog Tags: stack-overflow, recursion, prolog Problem: Creating a 'remove member' function in prolog I am new to Prolog and I'm trying to to create function that will simply remove all instanc...
Creating a 'remove member' function in prolog Creating a 'remove member' function in prolog stack-overflow recursion prolog Creating ERROR Out Creating a 'remove member' function in prolog I am new to Prolog and I'm trying to to create function that will simply remove all instances of an element fro...
[ 0.00927734375, 0.0157470703125, 0.0037841796875, -0.0009613037109375, -0.0174560546875, -0.0015716552734375, -0.00787353515625, 0.02197265625, 0.00732421875, -0.032470703125, 0.025390625, -0.0034942626953125, 0.0023345947265625, -0.00592041015625, 0.0299072265625, 0.0069580078125, 0....
[ 56781, 3768, 26973, 272, 32786, 32354, 502, 4867, 177261, 5465, 118664, 195625, 151206, 24638, 13538, 23, 3525, 1250, 31577, 28282, 42856, 87388, 756, 110527, 12830, 1295, 5303, 25632, 18151, 2060, 11675, 903, 98, 17, 2046, 142, 18499, 191147...
[ 0.10302734375, 0.088623046875, 0.153076171875, 0.1331787109375, 0.271728515625, 0.1905517578125, 0.1312255859375, 0.225830078125, 0.0309295654296875, 0.02545166015625, 0.05078125, 0.0802001953125, 0.1015625, 0.076904296875, 0.0653076171875, 0.008544921875, 0.0243377685546875, 0.118...
embed
1895488_c0
1895488
prolog
0
Title: Prolog syntax - using function results Problem title: Prolog syntax - using function results Tags: permutation, prolog Problem: Prolog syntax - using function results I am trying to perform a sum operation on every result of : combination(0,_,[]). combination(K,L,[X|Xs]) :- K > 0, el(X,L,R), K1 is K-1, combinati...
Prolog syntax - using function results Prolog syntax - using function results permutation prolog function Prolog K-1 Prolog syntax - using function results I am trying to perform a sum operation on every result of : For example, the user will enter is_sum_equal_10 ([1,2,3,4,5,6,7]) and the result will be true if the su...
[ -0.00433349609375, 0.01422119140625, 0.0034637451171875, -0.000926971435546875, -0.0228271484375, 0.00154876708984375, -0.016845703125, -0.00665283203125, 0.000782012939453125, -0.025146484375, -0.01446533203125, 0.00170135498046875, 0.004241943359375, 0.000545501708984375, -0.0076904296...
[ 1250, 4867, 6002, 86531, 17368, 32354, 50339, 117, 561, 22062, 502, 341, 5759, 31577, 51339, 10554, 41018, 98, 11907, 16750, 111, 38937, 30957, 83, 11832, 71723, 963, 133063, 363, 80389, 136555, 29568, 2174, 14311, 21094, 105950, 4068, 237875...
[ 0.1768798828125, 0.248046875, 0.1436767578125, 0.187255859375, 0.0980224609375, 0.1866455078125, 0.227294921875, 0.10302734375, 0.17578125, 0.065673828125, 0.1263427734375, 0.09051513671875, 0.1475830078125, 0.0758056640625, 0.06829833984375, 0.17333984375, 0.13330078125, 0.0602722...
embed
51971113_c0
51971113
prolog
0
Title: succ not getting removed on pred Problem title: succ not getting removed on pred Tags: replicate, successor-arithmetics, prolog, list, haskell Problem: succ not getting removed on pred /* Define a Prolog predicate replicate/3 which corresponds to * the Haskell function of the same name, except that the numeric *...
succ not getting removed on pred succ not getting removed on pred replicate successor-arithmetics prolog list haskell Define Prolog Haskell succ not getting removed on pred So far I've come to this solution: but the problem is that the s(s(s(0))) is not getting reduced by the pred function. it results into p(p(p(s(s(s(...
[ 0.00323486328125, 0.023681640625, -0.0111083984375, 0.0439453125, -0.020751953125, 0.01190185546875, -0.01434326171875, 0.000705718994140625, 0.0098876953125, -0.034423828125, 0.0091552734375, -0.0047607421875, -0.00147247314453125, -0.0089111328125, 0.01416015625, -0.0020599365234375,...
[ 166, 10060, 959, 20949, 184750, 98, 1653, 143126, 67, 39457, 42, 8962, 502, 4867, 5303, 1556, 142508, 64552, 1250, 20625, 2060, 29806, 2967, 91, 132, 7, 177609, 34390, 32354, 50339, 915, 254, 2389, 167089, 5809, 51484, 4358 ]
[ 0.1925048828125, 0.2744140625, 0.1146240234375, 0.09130859375, 0.1617431640625, 0.0877685546875, 0.2357177734375, 0.153564453125, 0.040191650390625, 0.1224365234375, 0.01312255859375, 0.046173095703125, 0.0870361328125, 0.2049560546875, 0.1168212890625, 0.09197998046875, 0.2103271484...
embed
38196926_c0
38196926
prolog
0
Title: Real numbers not working in Prolog Problem title: Real numbers not working in Prolog Tags: clpfd, prolog Problem: Real numbers not working in Prolog I have following code: :-use_module(library(clpfd)). afn(A,B,C):- C #= B*A. It works all right with integers but not with decimal numbers: 43 ?- afn(20, 10, C). C =...
Real numbers not working in Prolog Real numbers not working in Prolog clpfd prolog Real Prolog use_module ERROR Domain clpfd_expression Real numbers not working in Prolog I have following code: It works all right with integers but not with decimal numbers: How can I work with decimals also here? Thanks. Edit: I find fo...
[ 0.00124359130859375, 0.00135040283203125, 0.0177001953125, 0.007568359375, 0.0191650390625, -0.0037841796875, 0.00122833251953125, -0.00762939453125, -0.00274658203125, -0.0299072265625, -0.018798828125, 0.00396728515625, -0.012939453125, -0.006103515625, 0.0216064453125, -0.0159912109...
[ 5120, 101935, 959, 20697, 23, 1250, 4867, 33139, 39557, 71, 502, 4527, 83279, 151206, 24638, 93702, 204629, 25632, 18151, 43240, 7108, 678, 892, 26255, 32380, 2749, 4488, 67553, 3688, 7413, 164, 26785, 51515, 4730 ]
[ 0.2154541015625, 0.194091796875, 0.0699462890625, 0.1182861328125, 0.0755615234375, 0.14501953125, 0.24365234375, 0.04302978515625, 0.0791015625, 0.1112060546875, 0.0906982421875, 0.0323486328125, 0.06207275390625, 0.0692138671875, 0.039154052734375, 0.097900390625, 0.143798828125, ...
embed
76396774_c1
76396774
prolog
1
the result is being showed like this: go(a,d). a-->b-->j-->i-->h-->g-->f-->k-->d-->I am in room d The problem is that when I ask for an alternative solution path,it keeps the previous latest value of the list and it prints it at the beggining of the next query just like this: go(a,d). a-->b-->j-->i-->h-->g-->f-->k-->d...
the result is being showed like this: go(a,d). a-->b-->j-->i-->h-->g-->f-->k-->d-->I am in room d The problem is that when I ask for an alternative solution path,it keeps the previous latest value of the list and it prints it at the beggining of the next query just like this: go(a,d). a-->b-->j-->i-->h-->g-->f-->k-->d...
[ 0.00982666015625, 0.040771484375, 0.0107421875, 0.01397705078125, 0.00189971923828125, 0.0166015625, -0.0135498046875, -0.0179443359375, 0.0169677734375, -0.042236328125, 0.00021839141845703125, -0.006195068359375, -0.00445556640625, 0.009521484375, -0.007110595703125, 0.00234985351562...
[ 16750, 8035, 168360, 1884, 903, 738, 11, 71, 170, 444, 23, 17155, 104, 2967, 26458, 100, 30700, 29806, 60875, 217, 13695, 96362, 42850, 34292, 5303, 28412, 7, 442, 99, 16680, 592, 11737, 41, 1294, 1660, 10, 29568, 98320, 72134, 5608, 18...
[ 0.148193359375, 0.0235137939453125, 0.133544921875, 0.0916748046875, 0.0296630859375, 0.134521484375, 0.0753173828125, 0.179443359375, 0.0396728515625, 0.10247802734375, 0.13037109375, 0.2244873046875, 0.1654052734375, 0.1285400390625, 0.135009765625, 0.03326416015625, 0.15625, 0.1...
embed
68037276_c1
68037276
prolog
1
.connector.internal.process.AbstractPrologProcess.getSession_internal, AbstractPrologProcess.java:379, AbstractPrologProcess.java:369, java.net.SocketInputStream.read, SocketInputStream.java:209, SocketInputStream.java:141, org.cs3.prolog.connector.internal.process.socket.InputStreamProxy.read, InputStreamProxy.java:79...
4 sun.nio.cs.StreamDecoder.implRead StreamDecoder.java:326 sun.nio.cs.StreamDecoder.read StreamDecoder.java:178 java.io.InputStreamReader.read InputStreamReader.java:184 java.io.BufferedReader.fill BufferedReader.java:161 java.io.BufferedReader.readLine BufferedReader.java:324 BufferedReader.java:389 SocketClient.java:...
[ 0.00994873046875, 0.004913330078125, 0.0296630859375, -0.01953125, 0.0014190673828125, -0.0025482177734375, 0.0068359375, -0.00148773193359375, -0.0037384033203125, -0.02880859375, -0.00019168853759765625, 0.030517578125, -0.0155029296875, -0.001068115234375, 0.004730224609375, 0.00738...
[ 201, 4262, 5305, 4439, 115061, 120152, 51744, 116120, 31345, 24071, 29902, 39116, 139305, 330, 846, 617, 79, 18234, 116115, 151525, 93232, 119861, 1061, 27853, 150, 158696, 20625, 2499, 37873, 4163, 1179, 8912, 19279, 63928, 62448, 1830, 168398...
[ 0.09881591796875, 0.125244140625, 0.154296875, 0.0845947265625, 0.1148681640625, 0.1427001953125, 0.1527099609375, 0.066162109375, 0.1575927734375, 0.20166015625, 0.0550537109375, 0.08056640625, 0.0750732421875, 0.12060546875, 0.1107177734375, 0.043914794921875, 0.04205322265625, 0...
embed
49183626_c0
49183626
prolog
0
Title: How to display all the results in one line in SWI PROLOG? Problem title: How to display all the results in one line in SWI PROLOG? Tags: prolog Problem: How to display all the results in one line in SWI PROLOG? I have a small databse in the *.pl file which contains various instances of 3 facts: male(NAME) female...
How to display all the results in one line in SWI PROLOG? How to display all the results in one line in SWI PROLOG? prolog How SWI PROLOG NAME CHILD_NAME MOTHER_NAME FATHER_NAME How to display all the results in one line in SWI PROLOG? I have a small databse in the *.pl file which contains various instances of 3 facts:...
[ 0.0186767578125, -0.005645751953125, 0.021728515625, 0.0174560546875, -0.0216064453125, 0.003448486328125, 0.01031494140625, -0.00311279296875, 0.021240234375, -0.037109375, -0.004547119140625, -0.00848388671875, -0.00213623046875, 0.00543212890625, -0.01190185546875, 0.00555419921875,...
[ 11249, 47, 44116, 756, 50339, 23, 1632, 13315, 159, 38969, 10514, 47510, 70, 502, 4867, 182512, 62455, 30693, 224750, 116350, 9843, 184, 2424, 11435, 110527, 138, 15824, 9655, 14192, 7155, 127, 720, 111, 990, 3917, 35166, 51042, 5962, 74 ]
[ 0.05218505859375, 0.00848388671875, 0.2005615234375, 0.1053466796875, 0.2076416015625, 0.0802001953125, 0.113525390625, 0.184326171875, 0.058624267578125, 0.214111328125, 0.1466064453125, 0.2142333984375, 0.03790283203125, 0.07720947265625, 0.1741943359375, 0.05999755859375, 0.019760...
embed
55360756_c1
55360756
prolog
1
the value of rc is always -1. I tried to modify the file main.pro as follows: same([H1|R1], [H2|R2]):- H1 is H2. same([], []) :- true. The program works correctly in this case, so the program parses correctly the list and reads correctly the first value of the list. Code signals: GNU, How, Prolog, Java, gnu.prolog.vm....
the value of rc is always -1. I tried to modify the file main.pro as follows: same([H1|R1], [H2|R2]):- H1 is H2. same([], []) :- true. The program works correctly in this case, so the program parses correctly the list and reads correctly the first value of the list. Code signals: GNU, How, Prolog, Java, gnu.prolog.vm....
[ 0.00634765625, 0.0234375, 0.00439453125, 0.0164794921875, -0.00689697265625, -0.01226806640625, -0.0029296875, 0.0184326171875, 0.01043701171875, -0.0269775390625, 0.0152587890625, 0.0240478515625, -0.0206298828125, -0.00946044921875, -0.00592041015625, -0.0074462890625, 0.0117797851...
[ 34292, 111, 19437, 83, 11343, 68940, 37842, 2811, 40383, 11435, 5201, 5, 3454, 5701, 841, 418, 1052, 76172, 304, 90173, 572, 5442, 29568, 1528, 43240, 26785, 70, 366, 5303, 12301, 5117, 28864, 26073, 165132, 11249, 1250, 4867, 41925, 104155...
[ 0.189697265625, 0.001312255859375, 0.253173828125, 0.054168701171875, 0.1494140625, 0.2083740234375, 0.013885498046875, 0.1318359375, 0.09417724609375, 0.14794921875, 0.1591796875, 0.02508544921875, 0.2373046875, 0.1317138671875, 0.0887451171875, 0.059722900390625, 0.04632568359375, ...
embed
20409272_c0
20409272
prolog
0
Title: Prolog: Replace list items using facts Problem title: Prolog: Replace list items using facts Tags: prolog Problem: Prolog: Replace list items using facts im trying to make a function that loops through a list and replaces the element if it matches a fact. I was able to implement a simple replacement that replace...
Prolog: Replace list items using facts Prolog: Replace list items using facts prolog facts Prolog Replace Result Prolog: Replace list items using facts im trying to make a function that loops through a list and replaces the element if it matches a fact. I was able to implement a simple replacement that replaces every e...
[ 0.0019989013671875, -0.00121307373046875, 0.00579833984375, 0.0224609375, -0.00147247314453125, 0.0022125244140625, -0.01214599609375, 0.031005859375, 0.01409912109375, -0.01446533203125, 0.005279541015625, -0.009521484375, -0.01611328125, -0.0206298828125, 0.01031494140625, 0.00469970...
[ 1250, 4867, 12, 853, 23935, 5303, 55769, 17368, 15824, 7, 502, 126684, 566, 31577, 3249, 10, 32354, 40956, 8305, 91995, 12830, 2174, 14858, 29479, 8781, 674, 11907, 35735, 23, 1193, 678, 990, 5, 3444, 47, 1884, 221, 70, 68252, 155761, 1...
[ 0.1785888671875, 0.2364501953125, 0.0213470458984375, 0.09307861328125, 0.2125244140625, 0.2264404296875, 0.1866455078125, 0.099365234375, 0.255615234375, 0.099609375, 0.12109375, 0.1971435546875, 0.043365478515625, 0.0797119140625, 0.0341796875, 0.0210418701171875, 0.170654296875, ...
embed
17040949_c1
17040949
prolog
1
R' is release point and 'D' deadline point. 'Lst' stands for Latest Start Point. 'Eet' stands for Earliest End Point. */ preemptable(A,no), rd(A,R,D), p(A,P), Lst is D-P, Eet is R+P, S in R..D, E in R..D, S #=< Lst, E #>= Eet, S #< E, P #= E-S, indomain(S), indomain(E). set(A,[],[]). /* When the activity can't be sched...
R' is release point and 'D' deadline point. 'Lst' stands for Latest Start Point. 'Eet' stands for Earliest End Point. */ preemptable(A,no), rd(A,R,D), p(A,P), Lst is D-P, Eet is R+P, S in R..D, E in R..D, S #=< Lst, E #>= Eet, S #< E, P #= E-S, indomain(S), indomain(E). set(A,[],[]). /* When the activity can't be sched...
[ -0.0125732421875, -0.0031585693359375, -0.004669189453125, 0.00147247314453125, -0.01239013671875, -0.002716064453125, -0.0103759765625, -0.0081787109375, 0.01287841796875, -0.0086669921875, -0.008056640625, -0.011474609375, -0.00177764892578125, -0.00579833984375, 0.0047607421875, 0.0...
[ 627, 83, 54452, 6275, 397, 157206, 866, 271, 9157, 100, 62805, 13794, 41097, 647, 126, 147, 150, 525, 18878, 479, 33548, 22819, 284, 157, 4216, 1052, 915, 683, 339, 391, 9, 241, 1328, 159, 23, 67018, 24931, 5423, 14847, 103488, 831, 1...
[ 0.1778564453125, 0.04400634765625, 0.2098388671875, 0.156494140625, 0.136474609375, 0.2294921875, 0.020538330078125, 0.140380859375, 0.06878662109375, 0.00091552734375, 0.1868896484375, 0.1181640625, 0.163330078125, 0.1279296875, 0.19775390625, 0.0506591796875, 0.0623779296875, 0.1...
embed
55281806_c0
55281806
prolog
0
Title: Having a List as an element in the list Prolog Problem title: Having a List as an element in the list Prolog Tags: recursion, prolog, list Problem: Having a List as an element in the list Prolog Given a list (List1), I am trying to square each number in the list and return the answers in a new list (List2), wher...
Having a List as an element in the list Prolog Having a List as an element in the list Prolog recursion prolog list Having List Prolog Tail SqrdN SqrdTail Having a List as an element in the list Prolog Given a list (List1), I am trying to square each number in the list and return the answers in a new list (List2), wher...
[ 0.006988525390625, -0.00494384765625, -0.00323486328125, 0.004119873046875, -0.0022125244140625, 0.01129150390625, -0.008544921875, -0.00347900390625, 0.006439208984375, 0.001708984375, 0.01385498046875, -0.00653076171875, -0.01324462890625, -0.006591796875, -0.021728515625, 0.00646972...
[ 171855, 10, 32036, 237, 12830, 23, 5303, 1250, 4867, 142, 195625, 502, 1218, 379, 864, 4216, 839, 9874, 154663, 17727, 31577, 108047, 12638, 14012, 30646, 35166, 3525, 10461, 304, 3173, 1542, 14, 3291, 18151, 10644, 18499, 1065, 84751, 1403...
[ 0.1253662109375, 0.0987548828125, 0.274658203125, 0.10675048828125, 0.222412109375, 0.08154296875, 0.224609375, 0.140380859375, 0.18408203125, 0.04931640625, 0.1396484375, 0.105712890625, 0.07586669921875, 0.07342529296875, 0.0919189453125, 0.06103515625, 0.0045166015625, 0.1160888...
embed
2225308_c0
2225308
prolog
0
Title: Prolog - Access Control? Problem title: Prolog - Access Control? Tags: prolog, java, interprolog Problem: Prolog - Access Control? I am currently using interprolog - which is basically java with a prolog backend, allowing both java and prolog calls from each other respectively. Now If i had say a frontend GUI co...
Prolog - Access Control? Prolog - Access Control? prolog java interprolog Prolog Access Control Prolog - Access Control? I am currently using interprolog - which is basically java with a prolog backend, allowing both java and prolog calls from each other respectively. Now If i had say a frontend GUI coded in java swing...
[ 0.031982421875, 0.000522613525390625, 0.00909423828125, 0.020751953125, -0.0089111328125, -0.006072998046875, -0.004486083984375, 0.0177001953125, -0.0032806396484375, -0.046142578125, 0.01220703125, 0.00518798828125, -0.0234375, 0.00616455078125, 0.000858306884765625, -0.0076293945312...
[ 1250, 4867, 20, 40266, 27131, 32, 502, 79, 330, 1940, 3454, 82424, 17368, 198343, 678, 4420, 3611, 190358, 15044, 136, 11782, 7, 1295, 12638, 3789, 107013, 538, 4263, 1902, 12912, 195490, 18151, 23, 144291, 4, 10, 73655, 26519, 50336, 297...
[ 0.2322998046875, 0.287109375, 0.0303192138671875, 0.2327880859375, 0.27099609375, 0.0245513916015625, 0.2005615234375, 0.15087890625, 0.1873779296875, 0.1663818359375, 0.212158203125, 0.05096435546875, 0.08612060546875, 0.0360107421875, 0.0025634765625, 0.0682373046875, 0.13830566406...
embed
32537813_c0
32537813
prolog
0
Title: How can i split a list in three other lists in prolog? Problem title: How can i split a list in three other lists in prolog? Tags: prolog, split Problem: How can i split a list in three other lists in prolog? This is the code that i've made and it should split the list in three other lists and in the first list ...
How can i split a list in three other lists in prolog? How can i split a list in three other lists in prolog? prolog split How Neg Odd Even Neg1 Odd1 Even1 How can i split a list in three other lists in prolog? This is the code that i've made and it should split the list in three other lists and in the first list there...
[ -0.00640869140625, 0.004364013671875, 0.001922607421875, -0.00022983551025390625, -0.02294921875, 0.007415771484375, 0.0034637451171875, 0.0152587890625, 0.017822265625, 0.002349853515625, 0.00176239013671875, -0.01507568359375, -0.01263427734375, 0.023681640625, 0.0111083984375, 0.006...
[ 11249, 831, 17, 65450, 5303, 23, 17262, 3789, 502, 4867, 10, 799, 177, 67948, 31267, 18151, 5117, 5608, 40907, 101935, 17932, 3853, 50960, 70270 ]
[ 0.06005859375, 0.05322265625, 0.03216552734375, 0.2333984375, 0.2313232421875, 0.134765625, 0.197998046875, 0.1219482421875, 0.1480712890625, 0.205322265625, 0.006561279296875, 0.056732177734375, 0.048675537109375, 0.16015625, 0.090087890625, 0.07537841796875, 0.040069580078125, 0....
embed
48077224_c0
48077224
prolog
0
Title: Prolog, how to add a clause if the base case is accepted Problem title: Prolog, how to add a clause if the base case is accepted Tags: prolog, transitive-closure Problem: Prolog, how to add a clause if the base case is accepted I am new to Prolog. I am trying to write a predicate that is true when there is a pat...
Prolog, how to add a clause if the base case is accepted Prolog, how to add a clause if the base case is accepted prolog transitive-closure Prolog Head Tail Prolog, how to add a clause if the base case is accepted I am new to Prolog. I am trying to write a predicate that is true when there is a path from X to Z, includ...
[ 0.0177001953125, 0.00872802734375, 0.0026397705078125, 0.0169677734375, -0.0167236328125, 0.0208740234375, -0.01397705078125, 0.00286865234375, 0.0125732421875, -0.006591796875, 0.019775390625, -0.005767822265625, -0.0177001953125, 0.0185546875, 0.006072998046875, -0.000371932983398437...
[ 1250, 4867, 3642, 15190, 70731, 13, 2174, 3647, 7225, 83, 68186, 71, 502, 62621, 170224, 44816, 1218, 379, 10, 3525, 31577, 33022, 1653, 2063, 29568, 3229, 60875, 1295, 1193, 47, 567, 26719, 990, 18151, 26366, 2046 ]
[ 0.1396484375, 0.22119140625, 0.048828125, 0.1876220703125, 0.22607421875, 0.1319580078125, 0.109130859375, 0.1962890625, 0.188232421875, 0.015228271484375, 0.16455078125, 0.0655517578125, 0.0889892578125, 0.1009521484375, 0.135986328125, 0.078369140625, 0.0931396484375, 0.077819824...
embed
64732339_c0
64732339
prolog
0
Title: Is !/0 supposed to cut through (\+)/1 or not? Problem title: Is !/0 supposed to cut through (\+)/1 or not? Tags: iso-prolog, prolog, prolog-cut Problem: Is !/0 supposed to cut through (\+)/1 or not? On the one hand: $ sicstus SICStus 4.6.0 (x86_64-linux-glibc2.17): Mon Apr 6 09:23:37 PDT 2020 [...] | ?- \+ (!,fa...
Is !/0 supposed to cut through (\+)/1 or not? Is !/0 supposed to cut through (\+)/1 or not? iso-prolog prolog prolog-cut SICStus x86_64-linux-glibc2.17 Mon Apr PDT GNU Prolog Welcome SWI-Prolog Is !/0 supposed to cut through (\+)/1 or not? On the one hand: ... on the other hand ... ... also on the other hand: Confusing...
[ 0.0184326171875, 0.0224609375, 0.005523681640625, 0.0093994140625, -0.0303955078125, -0.004180908203125, 0.012451171875, -0.00262451171875, 0.01165771484375, 0.01287841796875, -0.01416015625, 0.01495361328125, -0.0201416015625, -0.014404296875, 0.003936767578125, -0.00665283203125, 0...
[ 2071, 711, 107838, 134598, 47, 59226, 8305, 41872, 102817, 11583, 707, 959, 32, 15, 13882, 3454, 4867, 502, 19774, 159, 102198, 2143, 1022, 15276, 13307, 2397, 6077, 8773, 65037, 5442, 2489, 7465, 42053, 178294, 165132, 1250, 91334, 38969, ...
[ 0.0965576171875, 0.195068359375, 0.310791015625, 0.2191162109375, 0.1021728515625, 0.21484375, 0.26123046875, 0.1387939453125, 0.2861328125, 0.265869140625, 0.081787109375, 0.134033203125, 0.013519287109375, 0.06475830078125, 0.134033203125, 0.170166015625, 0.256103515625, 0.190185...
embed
54914149_c2
54914149
prolog
2
Testing, apply_macros, maplist_macros, meta_predicate, use_module, same_length, callable_arglists_appended, Parts0, Parts1, expand_goal_aux, my_expand_goal, Goal, Expanded, Expanded0, strip_module, MGoal_0, Module, Goal_0, aux_strip_module, MG_0, G_0, M1:MG1_0, MG1_0, maplist_aux_count, goal_expansion, Goal0, _Layout0...
Testing, apply_macros, maplist_macros, meta_predicate, use_module, same_length, callable_arglists_appended, Parts0, Parts1, expand_goal_aux, my_expand_goal, Goal, Expanded, Expanded0, strip_module, MGoal_0, Module, Goal_0, aux_strip_module, MG_0, G_0, M1:MG1_0, MG1_0, maplist_aux_count, goal_expansion, Goal0, _Layout0...
[ 0.012451171875, 0.00726318359375, 0.0004863739013671875, 0.026611328125, -0.0198974609375, 0.01385498046875, 0.0230712890625, -0.0157470703125, 0.0205078125, 0.00140380859375, 0.0089111328125, 0.0079345703125, -0.0203857421875, 0.006256103515625, -0.006988525390625, 0.0191650390625, ...
[ 8647, 214, 4, 59911, 454, 35572, 3666, 22288, 6562, 23550, 19714, 2063, 67, 4527, 83279, 13, 5701, 23986, 927, 11782, 2886, 61477, 9007, 2285, 16995, 2389, 7, 418, 71062, 519, 289, 10442, 759, 83613, 2940, 2016, 60075, 4431, 43613, 89624,...
[ 0.255859375, 0.1749267578125, 0.043487548828125, 0.170654296875, 0.018951416015625, 0.0943603515625, 0.2149658203125, 0.1859130859375, 0.22802734375, 0.21044921875, 0.1624755859375, 0.1396484375, 0.0283966064453125, 0.1453857421875, 0.190673828125, 0.04998779296875, 0.1182861328125, ...
embed
35543513_c0
35543513
prolog
0
Title: Prolog insert element issue Problem title: Prolog insert element issue Tags: prolog, list Problem: Prolog insert element issue So I have Prolog code to insert an element at a given position: ins(Val, [H|List], Pos, [H|Res]):- Pos > 1, !, Pos1 is Pos - 1, ins(Val, List, Pos1, Res). ins(Val, List, 1, [Val|List]). ...
Prolog insert element issue Prolog insert element issue prolog list Prolog Val List Pos Res Pos1 Prolog insert element issue So I have Prolog code to insert an element at a given position: This gives an output which works fine. Now I wanted to reuse this code at the start at the list. This gives me an output Can someon...
[ -0.010986328125, -0.002685546875, 0.00811767578125, 0.01239013671875, -0.0291748046875, 0.0223388671875, -0.02734375, -0.0216064453125, 0.00092315673828125, -0.03466796875, 0.0269775390625, 0.00004076957702636719, -0.00110626220703125, -0.01312255859375, 0.00970458984375, 0.00411987304...
[ 1250, 4867, 183540, 12830, 31089, 502, 5303, 4769, 32036, 13498, 9624, 418, 18151, 34475, 19069, 76199, 140992, 43240, 5885, 36663, 156883, 903, 4034, 99, 22936, 4358, 15400, 96276 ]
[ 0.165771484375, 0.257080078125, 0.2332763671875, 0.19873046875, 0.1717529296875, 0.1070556640625, 0.1336669921875, 0.13525390625, 0.122314453125, 0.133544921875, 0.06805419921875, 0.0282135009765625, 0.1632080078125, 0.02789306640625, 0.1431884765625, 0.019561767578125, 0.14929199218...
embed
2229162_c0
2229162
prolog
0
Title: Prolog - SWI specifically - where is pl located? Problem title: Prolog - SWI specifically - where is pl located? Tags: interprolog, linux, prolog, swi-prolog Problem: Prolog - SWI specifically - where is pl located? I'm trying to set up an environment with interprolog and SWI prolog, interprolog needs the locati...
Prolog - SWI specifically - where is pl located? Prolog - SWI specifically - where is pl located? interprolog linux prolog swi-prolog Prolog SWI Prolog - SWI specifically - where is pl located? I'm trying to set up an environment with interprolog and SWI prolog, interprolog needs the location of swi's "pl" but i cant f...
[ 0.0133056640625, 0.01220703125, -0.00007200241088867188, 0.0027618408203125, -0.037841796875, 0.0037078857421875, 0.004241943359375, -0.00811767578125, 0.007659912109375, -0.0135498046875, -0.0026092529296875, 0.020751953125, -0.0162353515625, -0.00396728515625, -0.0014801025390625, -0...
[ 1250, 4867, 159, 38969, 183037, 7440, 83, 6456, 105866, 1940, 3454, 11508, 6077, 502, 91, 2452, 9, 5423, 65998, 27117, 31913, 25, 2424, 45767, 7413, 442, 707, 19437, 4488, 678, 10644, 3934, 33949, 11675, 23, 127877, 5885, 13580, 144570, 2...
[ 0.1998291015625, 0.255126953125, 0.1170654296875, 0.2783203125, 0.0950927734375, 0.1346435546875, 0.06597900390625, 0.2578125, 0.1707763671875, 0.1702880859375, 0.1951904296875, 0.1282958984375, 0.0892333984375, 0.158203125, 0.09716796875, 0.240478515625, 0.00372314453125, 0.038391...
embed
68686849_c0
68686849
prolog
0
Title: Prolog, create a predicate that grab 3 diagonal values from 3 lists Problem title: Prolog, create a predicate that grab 3 diagonal values from 3 lists Tags: prolog Problem: Prolog, create a predicate that grab 3 diagonal values from 3 lists Hi so I have 3 lists = [1,2,3], [4,5,6], [7,8,9] I want to create a pred...
Prolog, create a predicate that grab 3 diagonal values from 3 lists Prolog, create a predicate that grab 3 diagonal values from 3 lists prolog 3 Prolog Prolog, create a predicate that grab 3 diagonal values from 3 lists Hi so I have 3 lists = [1,2,3], [4,5,6], [7,8,9] I want to create a predicate that create 2 list usi...
[ 0.018798828125, 0.012451171875, -0.0027618408203125, -0.004730224609375, -0.0107421875, 0.038330078125, -0.01239013671875, 0.01348876953125, 0.000335693359375, -0.01806640625, 0.015869140625, -0.00579833984375, -0.005126953125, -0.00506591796875, 0.004852294921875, 0.01513671875, -0....
[ 1250, 4867, 28282, 1653, 2063, 67, 59102, 138, 207997, 142424, 1295, 5303, 502, 2673, 765, 155761, 617, 104629, 966, 145180, 3444, 116, 17368, 27781, 2804, 5036, 831, 5351, 7941, 587, 4734, 8337, 4420, 106, 35166, 24234, 32628, 2046, 17932,...
[ 0.1829833984375, 0.243896484375, 0.1322021484375, 0.1881103515625, 0.22998046875, 0.146240234375, 0.15087890625, 0.2144775390625, 0.2301025390625, 0.18212890625, 0.06158447265625, 0.2305908203125, 0.1439208984375, 0.0068359375, 0.06036376953125, 0.1429443359375, 0.0606689453125, 0....
embed
34124035_c0
34124035
prolog
0
Title: Prolog not_member dont do its job Problem title: Prolog not_member dont do its job Tags: prolog, prolog-dif, list Problem: Prolog not_member dont do its job I have a Prolog problem here, I am trying to get unique airports into the list but my predicate does not work as expected. not_member(C, []). not_member(C, ...
Prolog not_member dont do its job Prolog not_member dont do its job prolog prolog-dif list Prolog not_member Prolog not_member dont do its job I have a Prolog problem here, I am trying to get unique airports into the list but my predicate does not work as expected. Sample query with expected answers: If you need facts ...
[ 0.00177764892578125, 0.00390625, 0.037109375, -0.0035552978515625, -0.0181884765625, 0.004119873046875, -0.0021209716796875, -0.00164794921875, 0.01177978515625, -0.0341796875, -0.00118255615234375, -0.0007171630859375, 0.0023345947265625, 0.006134033203125, 0.0023193359375, -0.0067443...
[ 1250, 4867, 959, 39, 27417, 13319, 54, 6863, 12447, 502, 428, 420, 5303, 2967, 31577, 2046, 36998, 146619, 7, 3934, 1653, 2063, 67, 4488, 84751, 947, 33209, 41, 1294, 35166, 3871, 15824, 2633, 3714, 4358, 77947, 71 ]
[ 0.1767578125, 0.2493896484375, 0.1815185546875, 0.07720947265625, 0.176513671875, 0.1412353515625, 0.106689453125, 0.1177978515625, 0.1795654296875, 0.12890625, 0.1258544921875, 0.161865234375, 0.1761474609375, 0.08984375, 0.048797607421875, 0.007476806640625, 0.1822509765625, 0.26...
embed
65037787_c0
65037787
prolog
0
Title: How to make prolong understand a connection by other relationship Problem title: How to make prolong understand a connection by other relationship Tags: prolog Problem: How to make prolong understand a connection by other relationship My DataBase => fact(a). fact(b). likes(a, rain). likes(a, snow). likes(b, X) :...
How to make prolong understand a connection by other relationship How to make prolong understand a connection by other relationship prolog How How to make prolong understand a connection by other relationship My DataBase => Prolog question => The logic here is so by rule Should be Yes but it doesnt make the connection ...
[ 0.01904296875, 0.0308837890625, 0.01153564453125, 0.0294189453125, -0.01483154296875, 0.004180908203125, -0.007598876953125, 0.009033203125, 0.00738525390625, -0.061767578125, -0.0146484375, -0.0106201171875, -0.01214599609375, -0.00072479248046875, -0.0015716552734375, -0.01318359375,...
[ 11249, 47, 3249, 85673, 28219, 94878, 390, 3789, 76755, 10, 502, 4867, 11809, 63473, 13, 1250, 9655, 62775, 3688, 221, 79986, 151117, 186, 32635, 1284, 22027, 18, 903, 12765, 5608, 30646, 876 ]
[ 0.0623779296875, 0.036956787109375, 0.11614990234375, 0.28857421875, 0.255859375, 0.1944580078125, 0.0723876953125, 0.1356201171875, 0.197509765625, 0.01175689697265625, 0.10064697265625, 0.1939697265625, 0.06500244140625, 0.1488037109375, 0.0215301513671875, 0.1068115234375, 0.08392...
embed
14044146_c2
14044146
prolog
2
kan,cse112). teaches(erkan,cse113). teaches(erkan,cse114). teaches(merkan,cse115). teaches(merkan,cse116). teaches(kan,cse117). teaches(kan,cse118). schedule([],[]). schedule([Course|CourseTail],[Course,Day,Slot|ScheduleTail]):- schedule(CourseTail,ScheduleTail), check(Course,Day,Slot,ScheduleTail). check(_, _, _,[]). ...
kan,cse112). teaches(erkan,cse113). teaches(erkan,cse114). teaches(merkan,cse115). teaches(merkan,cse116). teaches(kan,cse117). teaches(kan,cse118). schedule([],[]). schedule([Course|CourseTail],[Course,Day,Slot|ScheduleTail]):- schedule(CourseTail,ScheduleTail), check(Course,Day,Slot,ScheduleTail). check(_, _, _,[]). ...
[ 0.01806640625, 0.03369140625, 0.01025390625, 0.0244140625, -0.0517578125, -0.0118408203125, -0.0164794921875, -0.0020294189453125, 0.00909423828125, -0.017333984375, 0.0023040771484375, -0.00994873046875, 0.0036468505859375, -0.00262451171875, -0.0238037109375, 0.01483154296875, 0.01...
[ 203, 4, 67130, 88438, 194, 94957, 90, 56, 331, 116597, 129150, 1991, 103928, 120620, 115250, 116329, 80889, 132, 10625, 474, 58745, 9874, 379, 97141, 12631, 25452, 15246, 2077, 9, 184, 12765, 101, 304, 15411, 4233, 33787, 17727, 100599, 104...
[ 0.20654296875, 0.02728271484375, 0.1748046875, 0.2548828125, 0.09228515625, 0.2137451171875, 0.1435546875, 0.099609375, 0.1988525390625, 0.18359375, 0.15966796875, 0.0848388671875, 0.1478271484375, 0.1422119140625, 0.1669921875, 0.16552734375, 0.3017578125, 0.010223388671875, 0.0...
embed
50434109_c0
50434109
prolog
0
Title: update element in the list of list in prolog Problem title: update element in the list of list in prolog Tags: prolog Problem: update element in the list of list in prolog I have a list of list and a list. I want to update the list of list by using the element from the second list. For example: I have a list of ...
update element in the list of list in prolog update element in the list of list in prolog prolog NState update element in the list of list in prolog I have a list of list and a list. I want to update the list of list by using the element from the second list. For example: I have a list of list [[banan,NA],[apple,NA]] a...
[ 0.005279541015625, 0.011962890625, 0.00408935546875, 0.013427734375, -0.01806640625, 0.0341796875, -0.021240234375, 0.0230712890625, 0.0302734375, 0.02880859375, 0.00537109375, -0.007537841796875, -0.00185394287109375, -0.01409912109375, -0.0029296875, -0.0216064453125, 0.0234375, ...
[ 28350, 12830, 23, 5303, 111, 502, 4867, 52700, 19888, 136, 3444, 47, 17368, 17932, 105281, 6691, 9007, 133, 1177, 126, 10869, 11, 18151, 35064, 3647, 7225, 26785 ]
[ 0.1943359375, 0.18310546875, 0.02001953125, 0.1920166015625, 0.1077880859375, 0.15478515625, 0.2127685546875, 0.04241943359375, 0.2066650390625, 0.005218505859375, 0.039276123046875, 0.0227203369140625, 0.07513427734375, 0.10736083984375, 0.142333984375, 0.1202392578125, 0.0744018554...
embed
27276019_c0
27276019
prolog
0
Title: Prolog syntax error on format Problem title: Prolog syntax error on format Tags: clpfd, syntax, prolog, format Problem: Prolog syntax error on format I am getting a syntax error on my format line and i have no idea why! magic3(Variables):- Variables[A,B,C,D,E,F,G,H,I], fd_domain(Variables,1,9), fd_all_different(...
Prolog syntax error on format Prolog syntax error on format clpfd syntax prolog format Prolog magic3 Variables fd_domain fd_all_different fd_labeling Prolog syntax error on format I am getting a syntax error on my format line and i have no idea why! The code prints where all rows and columns are equal when added togeth...
[ -0.01513671875, 0.006805419921875, 0.01043701171875, 0.0032806396484375, -0.00146484375, -0.00262451171875, -0.00799560546875, 0.0164794921875, 0.000911712646484375, 0.006317138671875, -0.00104522705078125, -0.02392578125, -0.002655029296875, -0.0179443359375, 0.01348876953125, -0.0179...
[ 1250, 4867, 6002, 86531, 18499, 9384, 33139, 39557, 71, 502, 49846, 363, 111477, 56206, 1238, 5584, 238778, 152526, 13315, 6528, 15400, 18151, 28412, 756, 15555, 3365, 316, 105950, 49814, 25842 ]
[ 0.1463623046875, 0.23046875, 0.16015625, 0.2034912109375, 0.1759033203125, 0.1956787109375, 0.0203399658203125, 0.022735595703125, 0.0787353515625, 0.099853515625, 0.12646484375, 0.0887451171875, 0.1080322265625, 0.0819091796875, 0.010498046875, 0.054962158203125, 0.1549072265625, ...
embed
32190023_c0
32190023
prolog
0
Title: Split a list dynamically in Prolog Problem title: Split a list dynamically in Prolog Tags: list, prolog Problem: Split a list dynamically in Prolog I started with prolog a few weeks, and yet I'm seeing more deeper the construction of recursive predicates who manipulate lists. My question is: it's possible build ...
Split a list dynamically in Prolog Split a list dynamically in Prolog list prolog Split Prolog NumberLists Lists Split a list dynamically in Prolog I started with prolog a few weeks, and yet I'm seeing more deeper the construction of recursive predicates who manipulate lists. My question is: it's possible build a predi...
[ -0.01123046875, 0.00775146484375, 0.0081787109375, 0.01324462890625, -0.030517578125, 0.0218505859375, -0.0052490234375, 0.0201416015625, 0.01104736328125, -0.017822265625, -0.00125885009765625, -0.016845703125, -0.0206298828125, 0.0177001953125, 0.01904296875, 0.0130615234375, 0.026...
[ 46474, 5303, 84079, 1250, 4867, 25958, 23, 502, 103332, 154663, 32036, 50961, 195625, 5844, 1653, 2063, 1636, 45258, 7722, 45367, 18, 65450, 8337, 14012, 3789, 28987, 841, 58745, 618, 208124, 27781 ]
[ 0.2347412109375, 0.2183837890625, 0.199462890625, 0.1436767578125, 0.2120361328125, 0.01910400390625, 0.002960205078125, 0.0921630859375, 0.1087646484375, 0.1871337890625, 0.17041015625, 0.0178680419921875, 0.1502685546875, 0.0770263671875, 0.1407470703125, 0.1502685546875, 0.0484619...
embed
32685993_c0
32685993
prolog
0
Title: Prolog - Describe facts and rules Problem title: Prolog - Describe facts and rules Tags: prolog Problem: Prolog - Describe facts and rules I want to describe in prolog the following facts and rules: Nick is programming in Java. Nick is programming in Python Nick is friend with anyone that is programming in Java ...
Prolog - Describe facts and rules Prolog - Describe facts and rules prolog Prolog Describe Nick Jim Prolog - Describe facts and rules I want to describe in prolog the following facts and rules: Nick is programming in Java. Nick is programming in Python Nick is friend with anyone that is programming in Java and Python J...
[ 0.022705078125, 0.006988525390625, 0.004669189453125, 0.0230712890625, -0.00836181640625, 0.0198974609375, -0.0245361328125, 0.0096435546875, -0.013671875, -0.02734375, -0.005340576171875, -0.0181884765625, -0.020263671875, 0.007080078125, -0.0059814453125, 0.009033203125, 0.02807617...
[ 1250, 4867, 262, 34601, 15824, 7, 136, 91736, 502, 47801, 41994, 3444, 98363, 23, 25632, 83, 56037, 449, 41925, 145581, 34391, 678, 35672, 756, 46876, 14602, 14037, 29806, 138, 201, 927, 6183, 77947 ]
[ 0.171875, 0.2685546875, 0.10986328125, 0.2095947265625, 0.1729736328125, 0.0240478515625, 0.099853515625, 0.1962890625, 0.14404296875, 0.2196044921875, 0.2939453125, 0.0650634765625, 0.1951904296875, 0.051971435546875, 0.0208892822265625, 0.058380126953125, 0.1746826171875, 0.08728...
embed
58530940_c0
58530940
prolog
0
Title: What does X evaluate to in the second operand of a predicate such as &quot;example([X|L1], [X,X|L2])&quot; Problem title: What does X evaluate to in the second operand of a predicate such as &quot;example([X|L1], [X,X|L2])&quot; Tags: prolog Problem: What does X evaluate to in the second operand of a predicate s...
What does X evaluate to in the second operand of a predicate such as &quot;example([X|L1], [X,X|L2])&quot; What does X evaluate to in the second operand of a predicate such as &quot;example([X|L1], [X,X|L2])&quot; prolog What What does X evaluate to in the second operand of a predicate such as "example([X|L1], [X,X|L2]...
[ 0.013427734375, 0.01031494140625, 0.010986328125, 0.00665283203125, -0.003631591796875, 0.0240478515625, 0.01446533203125, 0.0255126953125, 0.01361083984375, 0.01422119140625, -0.0067138671875, -0.01312255859375, 0.004425048828125, -0.024169921875, -0.01519775390625, 0.0233154296875, ...
[ 4865, 1193, 151575, 13, 47, 17932, 6264, 2208, 1653, 2063, 67, 11, 1542, 76172, 90173, 23, 33209, 502, 4867, 2967, 11907, 12830, 5303, 171763, 3674, 29806, 1250, 51, 27430, 90, 678, 2367, 40383, 6562, 21771, 47314 ]
[ 0.0202178955078125, 0.2001953125, 0.1661376953125, 0.060302734375, 0.11083984375, 0.1781005859375, 0.1353759765625, 0.09283447265625, 0.1129150390625, 0.157958984375, 0.0190582275390625, 0.0570068359375, 0.0780029296875, 0.047027587890625, 0.073974609375, 0.00567626953125, 0.02767944...
embed
65947830_c1
65947830
prolog
1
abort % Execution Aborted ====================== this works, but have to set the position LAST !!! and cant use the GUARD ! :- use_module(library(chr)). :- chr_constraint move/2,pos/2, next/0. :- [utils]. rand(X,Y) :- random(0,2,X), random(0,2,Y), say("~w,~w",[X,Y]). next <=> move(X,Y), rand(X,Y). move(A,B),pos(X,Y) <...
abort % Execution Aborted ====================== this works, but have to set the position LAST !!! and cant use the GUARD ! :- use_module(library(chr)). :- chr_constraint move/2,pos/2, next/0. :- [utils]. rand(X,Y) :- random(0,2,X), random(0,2,Y), say("~w,~w",[X,Y]). next <=> move(X,Y), rand(X,Y). move(A,B),pos(X,Y) <...
[ -0.008056640625, 0.00909423828125, 0.027587890625, 0.00714111328125, 0.0103759765625, 0.02685546875, -0.0038909912109375, -0.000316619873046875, -0.007659912109375, -0.029541015625, 0.00872802734375, 0.035400390625, -0.0098876953125, -0.0084228515625, 0.00421142578125, -0.0126953125, ...
[ 64853, 1745, 211603, 1830, 62, 3422, 3674, 903, 43240, 1284, 765, 47, 5423, 19069, 172905, 7625, 45767, 4527, 48153, 49444, 711, 83279, 150, 2844, 206, 42, 17656, 2271, 2816, 4288, 25813, 12477, 7522, 11737, 107838, 1003, 7870, 27388, 1542,...
[ 0.283447265625, 0.181884765625, 0.1923828125, 0.0997314453125, 0.060791015625, 0.2325439453125, 0.1669921875, 0.0933837890625, 0.14892578125, 0.050445556640625, 0.050445556640625, 0.01373291015625, 0.15234375, 0.2156982421875, 0.195068359375, 0.0743408203125, 0.09307861328125, 0.12...
embed
64198449_c0
64198449
prolog
0
Title: Prolog symmetric encryption Problem title: Prolog symmetric encryption Tags: prolog Problem: Prolog symmetric encryption So i am new to prolog. I need to create a predicate xor(+Text,+Key,-Cipher). I can assume that +Text and +Key have the same length. +Text contains a list of 0's and 1's, and so does +Key . I n...
Prolog symmetric encryption Prolog symmetric encryption prolog Prolog Text Key Cipher Plaintext TODO xor_check Prolog symmetric encryption So i am new to prolog. I need to create a predicate xor(+Text,+Key,-Cipher). I can assume that +Text and +Key have the same length. +Text contains a list of 0's and 1's, and so does...
[ 0.009521484375, -0.00909423828125, 0.00811767578125, -0.023681640625, -0.0230712890625, 0.0107421875, 0.0042724609375, 0.0027313232421875, 0.0027618408203125, 0.0126953125, -0.003936767578125, 0.014404296875, -0.0027923583984375, 0.0037384033203125, -0.00148773193359375, -0.01031494140...
[ 1250, 4867, 230612, 136791, 502, 24129, 26824, 94266, 8950, 22829, 9926, 13223, 74706, 78292, 3525, 3871, 28282, 1653, 2063, 67, 1328, 174379, 162429, 40658, 41591, 997, 5701, 140909, 70541, 5303, 757, 136, 106, 51339, 1193, 24638, 39933, 126...
[ 0.1309814453125, 0.217529296875, 0.190673828125, 0.1488037109375, 0.1083984375, 0.1575927734375, 0.144287109375, 0.162353515625, 0.02398681640625, 0.1217041015625, 0.041839599609375, 0.1143798828125, 0.2098388671875, 0.215087890625, 0.052978515625, 0.000030517578125, 0.0712890625, ...
embed
73366164_c0
73366164
prolog
0
Title: Can anyone explain to me what this Prolog code is doing? Problem title: Can anyone explain to me what this Prolog code is doing? Tags: prolog Problem: Can anyone explain to me what this Prolog code is doing? So I have a question I need to answer commenting on how this code is executed and what it is doing and I ...
Can anyone explain to me what this Prolog code is doing? Can anyone explain to me what this Prolog code is doing? prolog Can Prolog Can anyone explain to me what this Prolog code is doing? So I have a question I need to answer commenting on how this code is executed and what it is doing and I am not sure what is going ...
[ -0.0021820068359375, 0.028564453125, 0.01495361328125, -0.000049114227294921875, 0.006591796875, 0.02392578125, -0.001861572265625, -0.004302978515625, 0.004058837890625, 0.0166015625, 0.010498046875, -0.01287841796875, -0.01336669921875, -0.01226806640625, 0.00274658203125, 0.00363159...
[ 4171, 35672, 73342, 47, 163, 2367, 903, 1250, 4867, 18151, 83, 20594, 502, 9655, 3871, 35166, 6868, 3642, 71924, 442, 959, 9077, 7730, 98, 23, 5351, 9844, 54, 2174, 142424, 108975, 5303, 4358, 1146, 140992, 41, 1294, 118861, 35064, 915, ...
[ 0.115234375, 0.06121826171875, 0.2125244140625, 0.073974609375, 0.06683349609375, 0.1280517578125, 0.123291015625, 0.199462890625, 0.261474609375, 0.224609375, 0.08538818359375, 0.155517578125, 0.1671142578125, 0.05743408203125, 0.0386962890625, 0.0706787109375, 0.1068115234375, 0....
embed
29583315_c0
29583315
prolog
0
Title: Prolog returns variable name instead of value Problem title: Prolog returns variable name instead of value Tags: prolog Problem: Prolog returns variable name instead of value I have a method which checks where to place the next brick while building a tower. freePosition(POS, LEVEL) :- levelWithSpace(LEVEL), free...
Prolog returns variable name instead of value Prolog returns variable name instead of value prolog Prolog POS LEVEL Prolog returns variable name instead of value I have a method which checks where to place the next brick while building a tower. This method checks for a level with space and asks for the free positions o...
[ 0.006927490234375, -0.004119873046875, 0.0003185272216796875, 0.0245361328125, -0.00518798828125, 0.0089111328125, -0.0308837890625, 0.0126953125, 0.00836181640625, 0.0050048828125, 0.04052734375, 0.0101318359375, 0.00994873046875, 0.00885009765625, -0.0101318359375, 0.00457763671875, ...
[ 1250, 4867, 30646, 77336, 9351, 64457, 111, 34292, 502, 54602, 17428, 51442, 7, 55300, 12765, 7440, 3687, 11737, 41537, 33976, 47, 6488, 17366, 32628, 26458, 4092, 19069, 903, 6626, 50339, 33000, 55257, 25632, 140992, 831, 15549, 123166, 1369...
[ 0.186279296875, 0.289306640625, 0.1959228515625, 0.252685546875, 0.147216796875, 0.171142578125, 0.05877685546875, 0.2095947265625, 0.1287841796875, 0.2396240234375, 0.10205078125, 0.1689453125, 0.010955810546875, 0.132080078125, 0.1282958984375, 0.07086181640625, 0.0947265625, 0.0...
embed
53975167_c0
53975167
prolog
0
Title: How to obtain ALL the combinations with repetition of the elements of a list - prolog Problem title: How to obtain ALL the combinations with repetition of the elements of a list - prolog Tags: prolog Problem: How to obtain ALL the combinations with repetition of the elements of a list - prolog I'm trying to get ...
How to obtain ALL the combinations with repetition of the elements of a list - prolog How to obtain ALL the combinations with repetition of the elements of a list - prolog prolog How ALL How to obtain ALL the combinations with repetition of the elements of a list - prolog I'm trying to get all the combinations with rep...
[ -0.026611328125, 0.010498046875, -0.0079345703125, -0.00323486328125, -0.01123046875, 0.00830078125, -0.005340576171875, -0.01300048828125, 0.0245361328125, -0.002410888671875, 0.006103515625, 0.00159454345703125, 0.004791259765625, 0.006103515625, -0.00640869140625, 0.00604248046875, ...
[ 11249, 47, 113054, 58837, 70, 162515, 7, 678, 57346, 1363, 80854, 5303, 502, 4867, 111, 31577, 2046, 756, 23, 339, 6, 176377, 13267, 541, 866, 115055, 194, 84751, 16750, 186 ]
[ 0.06182861328125, 0.0256195068359375, 0.1712646484375, 0.1968994140625, 0.0693359375, 0.275634765625, 0.1114501953125, 0.1123046875, 0.275390625, 0.107666015625, 0.184814453125, 0.195068359375, 0.067626953125, 0.14453125, 0.0142364501953125, 0.0684814453125, 0.0777587890625, 0.1304...
embed
34846414_c0
34846414
prolog
0
Title: Prolog - Find sublists in order Problem title: Prolog - Find sublists in order Tags: prolog, list, sublist Problem: Prolog - Find sublists in order I am currently using this in my Prolog program: sublist(X, L) :- append(_, S, L), append(X, _, S). It will correctly list the sublists of a list if I call it like so...
Prolog - Find sublists in order Prolog - Find sublists in order prolog list sublist Prolog Find Prolog - Find sublists in order I am currently using this in my Prolog program: It will correctly list the sublists of a list if I call it like so, I am looking to make a new function that will try all the shorter substrings...
[ 0.00946044921875, -0.0020904541015625, 0.0211181640625, -0.0006561279296875, -0.01483154296875, 0.0086669921875, 0.00122833251953125, -0.007110595703125, 0.0272216796875, -0.009765625, 0.0191650390625, 0.0028533935546875, -0.0123291015625, -0.0064697265625, 0.0052490234375, 0.022949218...
[ 1250, 4867, 26040, 1614, 6562, 7, 23, 12989, 502, 5303, 82424, 17368, 903, 1528, 26785, 11782, 1884, 221, 16487, 32354, 9790, 16610, 56, 91693, 5117, 1286, 1810, 201505, 30306, 12601 ]
[ 0.1671142578125, 0.25439453125, 0.1424560546875, 0.229736328125, 0.254638671875, 0.0777587890625, 0.01959228515625, 0.205322265625, 0.1143798828125, 0.1322021484375, 0.020263671875, 0.049896240234375, 0.01007080078125, 0.07025146484375, 0.057861328125, 0.09521484375, 0.0791015625, ...
embed
22386947_c0
22386947
prolog
0
Title: Route planning in Prolog Problem title: Route planning in Prolog Tags: prolog Problem: Route planning in Prolog Here is a route planning program given by an online tutorial:- route(X,Y,R) :- route(X,Y,[X],R). route(X,Y,_,[drive(X,Y)]) :- travel(X,Y). route(X,Y,V,[drive(X,Z)|R]) :- travel(X,Z), \+ member(Z,V), ro...
Route planning in Prolog Route planning in Prolog prolog Route Prolog Only Route planning in Prolog Here is a route planning program given by an online tutorial:- What I do not understand is the commented statement: Z\=Y . Why this statement is needed? And why that statement is only needed if Y is not ground?
[ 0.01080322265625, 0.0157470703125, 0.00482177734375, 0, -0.01470947265625, -0.0064697265625, -0.0017852783203125, -0.0123291015625, 0.0026702880859375, -0.004302978515625, 0.004150390625, 0.0157470703125, -0.021484375, -0.0098876953125, 0.002166748046875, 0.0301513671875, 0.005279541...
[ 106015, 58136, 23, 1250, 4867, 502, 87293, 36439, 1528, 34475, 1118, 57143, 54, 959, 28219, 6868, 297, 63805, 567, 41872, 1369, 1723, 44084, 903, 83, 44841, 15400, 4734, 2174, 990, 61585 ]
[ 0.2005615234375, 0.208984375, 0.063720703125, 0.18115234375, 0.27197265625, 0.1334228515625, 0.10595703125, 0.18603515625, 0.127685546875, 0.0099029541015625, 0.087158203125, 0.134521484375, 0.013275146484375, 0.13671875, 0.1207275390625, 0.1663818359375, 0.0706787109375, 0.1989746...
embed
34662889_c0
34662889
prolog
0
Title: Using the printlist/1 predicate in Prolog to sum up all numbers in a list Problem title: Using the printlist/1 predicate in Prolog to sum up all numbers in a list Tags: prolog, list Problem: Using the printlist/1 predicate in Prolog to sum up all numbers in a list I am trying to use the printlist/1 predicate to ...
Using the printlist/1 predicate in Prolog to sum up all numbers in a list Using the printlist/1 predicate in Prolog to sum up all numbers in a list prolog list Using Prolog Totalsum Using the printlist/1 predicate in Prolog to sum up all numbers in a list I am trying to use the printlist/1 predicate to sum up all the n...
[ 0.00665283203125, 0.0152587890625, 0.0172119140625, 0.00799560546875, -0.0244140625, 0.01373291015625, -0.007568359375, 0.0228271484375, -0.004791259765625, -0.024658203125, 0.004638671875, -0.0218505859375, -0.005523681640625, 0.00830078125, 0.00848388671875, 0.0130615234375, 0.0159...
[ 345, 28412, 6562, 11583, 1653, 2063, 1250, 4867, 10554, 1257, 756, 101935, 5303, 67, 502, 33867, 11832, 4527, 179933, 18151, 98320, 3714, 44691, 4358 ]
[ 0.003173828125, 0.1572265625, 0.21923828125, 0.1417236328125, 0.138916015625, 0.150146484375, 0.1429443359375, 0.206298828125, 0.198486328125, 0.1317138671875, 0.0826416015625, 0.1171875, 0.171875, 0.033447265625, 0.09942626953125, 0.0899658203125, 0.2071533203125, 0.04937744140625...
embed
33227001_c0
33227001
prolog
0
Title: Prolog Kbase implementation Problem title: Prolog Kbase implementation Tags: prolog Problem: Prolog Kbase implementation So my approach to this problem is logical. And everything works as expected. My code is below: employees(billSmith). employees(bobJones). employees(lindaHiggs). married(billSmith,karenSmith). ...
Prolog Kbase implementation Prolog Kbase implementation prolog Prolog Kbase Prolog Kbase implementation So my approach to this problem is logical. And everything works as expected. My code is below: Sample query: My question: I am getting the right output, but why is my output redundant? How can I transform my implemen...
[ 0.0264892578125, 0.0079345703125, 0.0103759765625, 0.0181884765625, -0.02294921875, 0.031494140625, -0.0308837890625, -0.00110626220703125, -0.00457763671875, -0.03125, 0.0089111328125, 0.0162353515625, 0.0027618408203125, 0.0296630859375, -0.0194091796875, 0.02587890625, 0.029663085...
[ 1250, 4867, 341, 37382, 208124, 502, 51515, 2967, 62775, 289, 26818, 43240, 84751, 18151, 35064, 33209, 41, 1294, 9655, 444, 20949, 7108, 140992, 1284, 15400, 83, 759, 4842, 35405, 18, 11249, 27198, 2046, 11001, 351, 693, 52721, 35166, 3952...
[ 0.14404296875, 0.233154296875, 0.091064453125, 0.268798828125, 0.2215576171875, 0.0987548828125, 0.1278076171875, 0.092529296875, 0.10009765625, 0.062164306640625, 0.05657958984375, 0.0909423828125, 0.07806396484375, 0.152587890625, 0.05950927734375, 0.11328125, 0.1033935546875, 0....
embed
40804092_c0
40804092
prolog
0
Title: Getting successive element that is repeated in a list n times prologue Problem title: Getting successive element that is repeated in a list n times prologue Tags: prolog, list Problem: Getting successive element that is repeated in a list n times prologue I am trying to make function that returns element witch i...
Getting successive element that is repeated in a list n times prologue Getting successive element that is repeated in a list n times prologue prolog list Getting Clause ARGS Getting successive element that is repeated in a list n times prologue I am trying to make function that returns element witch is repeated n times...
[ 0.01055908203125, 0.0020294189453125, -0.01080322265625, 0.0177001953125, -0.007781982421875, 0.00201416015625, -0.01025390625, 0.00262451171875, 0.022705078125, -0.0498046875, -0.012939453125, -0.0029754638671875, -0.0186767578125, 0.004547119140625, 0.00238037109375, 0.00029563903808...
[ 210732, 208479, 12830, 450, 83, 119140, 297, 23, 5303, 653, 20028, 4083, 179554, 502, 4867, 100700, 13, 13685, 34162, 10, 31577, 32354, 30646, 131519, 1884, 16750, 5608, 241, 2203, 876, 1544, 525, 3917, 20594, 8382, 201, 80854, 765, 186, ...
[ 0.113037109375, 0.2398681640625, 0.1961669921875, 0.0273590087890625, 0.0789794921875, 0.2454833984375, 0.14453125, 0.056121826171875, 0.18310546875, 0.1322021484375, 0.1993408203125, 0.1304931640625, 0.2103271484375, 0.10986328125, 0.163330078125, 0.1258544921875, 0.07763671875, 0...
embed
46281298_c0
46281298
prolog
0
Title: Prolog How can I construct a list of list into a single list by interleaving? Problem title: Prolog How can I construct a list of list into a single list by interleaving? Tags: interleave, list, prolog Problem: Prolog How can I construct a list of list into a single list by interleaving? How can I construct a li...
Prolog How can I construct a list of list into a single list by interleaving? Prolog How can I construct a list of list into a single list by interleaving? interleave list prolog Prolog How REST List Prolog How can I construct a list of list into a single list by interleaving? How can I construct a list of a list into ...
[ -0.00634765625, 0.000545501708984375, 0.007293701171875, 0.015625, 0.0031890869140625, 0.028564453125, -0.0291748046875, 0.011474609375, 0.0081787109375, -0.0201416015625, 0.0279541015625, -0.01318359375, -0.003692626953125, 0.02001953125, 0.004974365234375, 0.0040283203125, 0.017578...
[ 1250, 4867, 831, 64549, 5303, 111, 3934, 11001, 1940, 14507, 6496, 390, 133, 8216, 502, 627, 21828, 32036, 11249, 1632, 678, 1614, 6562, 44188, 133063, 82449, 1542, 8337, 1193, 1369, 68252, 363, 304, 617, 31577, 21974, 18151, 11343, 114453,...
[ 0.111083984375, 0.19384765625, 0.039886474609375, 0.198486328125, 0.231689453125, 0.05401611328125, 0.1405029296875, 0.178955078125, 0.177978515625, 0.1697998046875, 0.1171875, 0.0142364501953125, 0.131591796875, 0.1424560546875, 0.053314208984375, 0.05621337890625, 0.13330078125, ...
embed
22965189_c0
22965189
prolog
0
Title: How can I access the first two elements of a list without using recursion? Problem title: How can I access the first two elements of a list without using recursion? Tags: prolog Problem: How can I access the first two elements of a list without using recursion? How can I access the first two elements of a list w...
How can I access the first two elements of a list without using recursion? How can I access the first two elements of a list without using recursion? prolog recursion How List Sum ListAcc Acc NewAcc How can I access the first two elements of a list without using recursion? How can I access the first two elements of a l...
[ -0.00066375732421875, 0.0172119140625, 0.00274658203125, 0.03076171875, -0.00119781494140625, 0.020751953125, -0.02294921875, 0.0260009765625, 0.029296875, -0.045166015625, 0.03466796875, 0.0113525390625, -0.011474609375, -0.0003376007080078125, 0.0003223419189453125, 0.0252685546875, ...
[ 831, 17203, 5117, 6626, 80854, 5303, 15490, 17368, 195625, 1830, 11249, 502, 4867, 32036, 36335, 10060, 29899, 2356, 87, 111, 1542, 418, 304, 363, 617, 43317, 3444, 54, 1193, 997, 758, 26785, 8437, 15190, 10554, 1639, 17727 ]
[ 0.043365478515625, 0.187255859375, 0.147216796875, 0.1612548828125, 0.1768798828125, 0.2037353515625, 0.1102294921875, 0.061370849609375, 0.1768798828125, 0.101318359375, 0.02886962890625, 0.1131591796875, 0.17138671875, 0.142333984375, 0.1942138671875, 0.08502197265625, 0.0755615234...
embed
3530180_c1
3530180
prolog
1
2], [4, 1]]] ; V = [[[1, 3], [4, 2]]] ; V = [[[3, 1], [4, 2]]] ; V = [[[3, 4], [1, 2]]] ; V = [[[3, 4], [2, 1]]] ; V = [[[1, 2], [4, 3]]] ; V = [[[2, 1], [4, 3]]] ; V = [[[2, 4], [1, 3]]] ; V = [[[2, 4], [3, 1]]] ; V = [[[1, 4], [2, 3]]] ; V = [[[4, 1], [2, 3]]] ; V = [[[4, 2], [1, 3]]] ; V = [[[4, 2], [3, 1]]] ; V = [...
2], [4, 1]]] ; V = [[[1, 3], [4, 2]]] ; V = [[[3, 1], [4, 2]]] ; V = [[[3, 4], [1, 2]]] ; V = [[[3, 4], [2, 1]]] ; V = [[[1, 2], [4, 3]]] ; V = [[[2, 1], [4, 3]]] ; V = [[[2, 4], [1, 3]]] ; V = [[[2, 4], [3, 1]]] ; V = [[[1, 4], [2, 3]]] ; V = [[[4, 1], [2, 3]]] ; V = [[[4, 2], [1, 3]]] ; V = [[[4, 2], [3, 1]]] ; V = [...
[ -0.0125732421875, 0.016845703125, -0.002532958984375, 0.016845703125, 0.01177978515625, 0.0223388671875, -0.01458740234375, -0.0108642578125, 0.01141357421875, 0.011474609375, 0.0235595703125, 0.00445556640625, 0.040771484375, -0.00579833984375, -0.043701171875, 0.01171875, 0.0050048...
[ 116, 268, 4, 617, 106, 86245, 2819, 310, 2203, 110558, 418, 138, 363, 201, 304, 3444, 9844, 76199, 163, 645, 22751, 111, 756, 5303, 450, 2301, 18, 70541, 5701, 80854, 1556, 40175, 62766, 17569, 4527, 7413, 5584, 88308, 1284, 30646, 4393...
[ 0.103271484375, 0.04144287109375, 0.0202178955078125, 0.159423828125, 0.0535888671875, 0.0271148681640625, 0.0271148681640625, 0.2095947265625, 0.1207275390625, 0.00164794921875, 0.009185791015625, 0.09649658203125, 0.0841064453125, 0.1414794921875, 0.049072265625, 0.133056640625, 0....
embed
36775537_c0
36775537
prolog
0
Title: Prolog behavior Problem title: Prolog behavior Tags: prolog Problem: Prolog behavior I've been trying to learn Prolog by solving project euler. To solve problem #1, I came up with the following. divides(X,Y) :- Y mod X =:= 0. sumlist([],0). sumlist([H|T],X) :- sumlist(T,Y), X is Y + H. mult_3_or_5(X) :- between(...
Prolog behavior Prolog behavior prolog Prolog mult_3_or_5 find_sum Prolog behavior I've been trying to learn Prolog by solving project euler. To solve problem #1, I came up with the following. The problem with this is that it counts numbers that are divisible by both 3 and 5 twice. I certainly have a misunderstanding o...
[ 0.018310546875, 0.007293701171875, 0.02783203125, 0.0093994140625, -0.0228271484375, 0.0211181640625, -0.018798828125, -0.000576019287109375, 0.0205078125, -0.048583984375, 0.00689697265625, -0.032470703125, 0.00634765625, 0.004241943359375, 0.004913330078125, 0.0184326171875, 0.0156...
[ 1250, 4867, 123166, 502, 3869, 363, 748, 758, 7413, 11832, 30698, 3115, 13452, 1175, 603, 86869, 2967, 1257, 25632, 903, 54529, 7, 101935, 450, 45, 99017, 390, 15044, 138, 136, 190, 186351, 68782, 24658, 144057, 3642, 160404, 18822, 3871, ...
[ 0.1749267578125, 0.279541015625, 0.14697265625, 0.12548828125, 0.1727294921875, 0.15771484375, 0.092529296875, 0.21875, 0.1031494140625, 0.2030029296875, 0.020660400390625, 0.01300048828125, 0.055908203125, 0.045867919921875, 0.1416015625, 0.0443115234375, 0.1427001953125, 0.005737...
embed
34442925_c0
34442925
prolog
0
Title: Prolog: Exam schedule generator - How to avoid permutations in solutions Problem title: Prolog: Exam schedule generator - How to avoid permutations in solutions Tags: schedule, permutation, prolog Problem: Prolog: Exam schedule generator - How to avoid permutations in solutions I'm building an exam scheduler in ...
Prolog: Exam schedule generator - How to avoid permutations in solutions Prolog: Exam schedule generator - How to avoid permutations in solutions schedule permutation prolog Prolog Exam How Prolog: Exam schedule generator - How to avoid permutations in solutions I'm building an exam scheduler in Prolog. The scheduler i...
[ 0.018310546875, 0.013671875, 0.00726318359375, -0.005523681640625, -0.0361328125, -0.0194091796875, -0.032470703125, -0.0054931640625, -0.005706787109375, -0.052001953125, -0.004425048828125, 0.0091552734375, 0.0203857421875, -0.00836181640625, -0.016357421875, 0.01531982421875, -0.0...
[ 1250, 4867, 89536, 80889, 145823, 11249, 71864, 117, 14311, 21094, 23, 51347, 561, 502, 12, 47, 33976, 42276, 42, 35509, 27781, 3180, 11388, 10752, 8894, 3355, 302, 7560, 693, 133, 2424, 3249, 9077, 110, 29806, 418, 117914, 1733, 17155, 1...
[ 0.152587890625, 0.226318359375, 0.197509765625, 0.254638671875, 0.200927734375, 0.06524658203125, 0.2052001953125, 0.12255859375, 0.21533203125, 0.1121826171875, 0.044097900390625, 0.167236328125, 0.16748046875, 0.08636474609375, 0.004608154296875, 0.0163421630859375, 0.0733032226562...
embed
46198732_c0
46198732
prolog
0
Title: Delete 2nd and 3rd occurrence of an element Problem title: Delete 2nd and 3rd occurrence of an element Tags: prolog Problem: Delete 2nd and 3rd occurrence of an element I want to make a program that given a list L in which element X appears 3 times, it returns the NL list including it only one time. For example,...
Delete 2nd and 3rd occurrence of an element Delete 2nd and 3rd occurrence of an element prolog Delete Delete 2nd and 3rd occurrence of an element I want to make a program that given a list L in which element X appears 3 times, it returns the NL list including it only one time. For example, this question should return P...
[ 0.004119873046875, 0.0185546875, -0.00970458984375, -0.01129150390625, 0.0001506805419921875, 0.0186767578125, -0.0091552734375, 0.004852294921875, 0.0244140625, -0.029541015625, 0.0086669921875, 0.002655029296875, 0.018310546875, -0.006927490234375, -0.0140380859375, 0.0220947265625, ...
[ 262, 46485, 116, 2208, 136, 138, 4216, 74918, 42, 12830, 502, 4867, 3444, 3249, 1528, 34475, 5303, 339, 1193, 135179, 20028, 30646, 70, 39102, 26719, 4734, 1632, 1733, 9655, 5608, 436, 5, 294, 121691, 18, 26698, 80652, 1286, 18151, 1284, ...
[ 0.078125, 0.1617431640625, 0.141845703125, 0.113525390625, 0.09124755859375, 0.175537109375, 0.1488037109375, 0.123046875, 0.134765625, 0.1866455078125, 0.11083984375, 0.178955078125, 0.04937744140625, 0.059814453125, 0.1502685546875, 0.011199951171875, 0.1656494140625, 0.067199707...
embed
67357963_c0
67357963
prolog
0
Title: Prolog- How to append elements to end of list Problem title: Prolog- How to append elements to end of list Tags: prolog Problem: Prolog- How to append elements to end of list I am trying to write a function where, given a list of variables and lists, will return the first list of all uninterrupted variables, lik...
Prolog- How to append elements to end of list Prolog- How to append elements to end of list prolog Prolog How espaco_aux Esp Esp1 Prolog- How to append elements to end of list I am trying to write a function where, given a list of variables and lists, will return the first list of all uninterrupted variables, like this...
[ 0.001983642578125, 0.0185546875, 0.0035858154296875, 0.006378173828125, -0.01416015625, 0.0067138671875, -0.00970458984375, 0.0201416015625, 0.0157470703125, -0.025390625, 0.036865234375, 0.00958251953125, 0.001708984375, 0.00445556640625, 0.01483154296875, -0.00113677978515625, 0.02...
[ 1250, 4867, 11249, 114689, 71, 80854, 47, 3564, 111, 5303, 502, 101404, 587, 10442, 49650, 418, 31577, 33022, 32354, 34475, 77336, 30646, 5117, 756, 9167, 903, 34292, 115187, 304, 363, 138, 910, 617, 18151, 98320, 57767, 37397, 4460, 33, ...
[ 0.1610107421875, 0.2451171875, 0.057647705078125, 0.2073974609375, 0.147216796875, 0.22021484375, 0.1251220703125, 0.218994140625, 0.146240234375, 0.2142333984375, 0.10675048828125, 0.1314697265625, 0.128662109375, 0.152587890625, 0.1953125, 0.0828857421875, 0.04119873046875, 0.049...
embed
18260876_c0
18260876
prolog
0
Title: In a Warren&#x27;s Abstract Machine, where are Argument Variables created? Problem title: In a Warren&#x27;s Abstract Machine, where are Argument Variables created? Tags: prolog, warren-abstract-machine Problem: In a Warren's Abstract Machine, where are Argument Variables created? I'm trying to create my own WAM...
In a Warren&#x27;s Abstract Machine, where are Argument Variables created? In a Warren&#x27;s Abstract Machine, where are Argument Variables created? prolog warren-abstract-machine Warren Abstract Machine Argument Variables get_structure put_value put_variable In a Warren's Abstract Machine, where are Argument Variable...
[ 0.039306640625, 0.00299072265625, -0.0174560546875, 0.0284423828125, 0.00897216796875, 0.0252685546875, -0.010009765625, 0.00186920166015625, 0.005035400390625, 0.01190185546875, 0.02783203125, 0.010009765625, -0.00811767578125, -0.00762939453125, 0.00946044921875, -0.01055908203125, ...
[ 360, 171458, 3768, 233973, 68311, 7440, 621, 112140, 111477, 13566, 75935, 502, 4867, 1631, 982, 2816, 103149, 2046, 137656, 3884, 27494, 21690, 2886, 25, 28282, 10002, 4336, 594, 208124, 167934, 55412, 787, 963, 71947, 183447, 238478, 3034, ...
[ 0.0177459716796875, 0.2401123046875, 0.044158935546875, 0.240478515625, 0.1864013671875, 0.1397705078125, 0.044708251953125, 0.265869140625, 0.2359619140625, 0.1749267578125, 0.177734375, 0.07147216796875, 0.1009521484375, 0.06036376953125, 0.131103515625, 0.13525390625, 0.1055908203...
embed
29900493_c0
29900493
prolog
0
Title: No output in prolog Problem title: No output in prolog Tags: clpfd, cryptarithmetic-puzzle, prolog Problem: No output in prolog I am new to Prolog and was using it to solve a cryptarithmetic problem CROSS+ROADS = DANGER .However when the code is run ,there is no output can anybody tell me what is wrong with the ...
No output in prolog No output in prolog clpfd cryptarithmetic-puzzle prolog use_module cr_puzzle Puzzle all_different No output in prolog I am new to Prolog and was using it to solve a cryptarithmetic problem CROSS+ROADS = DANGER .However when the code is run ,there is no output can anybody tell me what is wrong with t...
[ 0.0133056640625, -0.005615234375, -0.000431060791015625, 0.02978515625, -0.0257568359375, 0.021728515625, -0.01019287109375, -0.003753662109375, 0.0016632080078125, -0.024169921875, -0.008056640625, -0.0284423828125, 0.0069580078125, 0.01397705078125, 0.0086669921875, -0.00283813476562...
[ 438, 140992, 23, 502, 4867, 33139, 39557, 71, 136791, 8962, 1766, 13894, 133, 4527, 83279, 8374, 179277, 756, 238778, 3525, 1250, 17368, 86869, 2967, 25109, 81801, 1328, 14255, 12351, 294, 2203, 14416, 56599, 18151, 11675, 9319, 110, 14192, ...
[ 0.1280517578125, 0.2498779296875, 0.0968017578125, 0.1640625, 0.238525390625, 0.01239013671875, 0.045135498046875, 0.06964111328125, 0.08782958984375, 0.05908203125, 0.053253173828125, 0.07275390625, 0.056182861328125, 0.039520263671875, 0.07470703125, 0.054779052734375, 0.1932373046...
embed
16253419_c0
16253419
prolog
0
Title: Adding a tail in Prolog Problem title: Adding a tail in Prolog Tags: prolog, recursion, tail Problem: Adding a tail in Prolog I'm having trouble understanding how prolog works with lists. I'm trying to write a function that will add a tail to a given list and returns a new list. but my implementation does not wo...
Adding a tail in Prolog Adding a tail in Prolog prolog recursion tail the Adding Prolog add_tail List List1 Adding a tail in Prolog I'm having trouble understanding how prolog works with lists. I'm trying to write a function that will add a tail to a given list and returns a new list. but my implementation does not wor...
[ 0.032958984375, 0.024658203125, 0.01348876953125, 0.003631591796875, -0.01220703125, 0.011474609375, -0.0234375, -0.00787353515625, 0.0191650390625, -0.0245361328125, 0.034912109375, -0.0267333984375, -0.004150390625, 0.022705078125, 0.030517578125, -0.01239013671875, 0.0071411132812...
[ 62, 59725, 10, 46741, 1250, 4867, 23, 502, 195625, 1830, 15190, 32036, 63134, 100094, 43240, 678, 5303, 7, 33022, 32354, 34475, 30646, 3525, 208124, 959, 4488, 28219, 30022, 27781, 140992 ]
[ 0.08062744140625, 0.102783203125, 0.07220458984375, 0.2705078125, 0.161376953125, 0.2423095703125, 0.0245208740234375, 0.1331787109375, 0.155029296875, 0.0567626953125, 0.1282958984375, 0.1373291015625, 0.0062255859375, 0.011260986328125, 0.09228515625, 0.07830810546875, 0.15625, 0...
embed
39314776_c0
39314776
prolog
0
Title: find sister relation from family tree using prolog Problem title: find sister relation from family tree using prolog Tags: prolog Problem: find sister relation from family tree using prolog I have facts: male , female and child . eg. /* tg and yem are mother and father. rika,kiku and susu are children*/ female(r...
find sister relation from family tree using prolog find sister relation from family tree using prolog prolog family prolog Sister1 Sister2 find sister relation from family tree using prolog I have facts: male , female and child . eg. Now I need a query to extract sister relation like But it results duplicate responses....
[ 0.0186767578125, -0.00384521484375, 0.01055908203125, -0.0130615234375, -0.00787353515625, -0.0035552978515625, -0.0137939453125, 0.0032196044921875, -0.0091552734375, -0.040283203125, -0.0128173828125, -0.01055908203125, 0.006500244140625, -0.01318359375, 0.0140380859375, 0.0172119140...
[ 7413, 114015, 41911, 14449, 53201, 17368, 502, 4867, 1295, 602, 1515, 418, 304, 15824, 11280, 117776, 29041, 41, 1294, 125663, 1884, 171763, 57553, 52295, 11001, 35166 ]
[ 0.0850830078125, 0.2235107421875, 0.1820068359375, 0.03277587890625, 0.173828125, 0.023101806640625, 0.11138916015625, 0.1707763671875, 0.0423583984375, 0.10919189453125, 0.098876953125, 0.020721435546875, 0.07269287109375, 0.08355712890625, 0.07470703125, 0.086669921875, 0.06640625,...
embed
43662477_c1
43662477
prolog
1
. The issues I'm hitting at the moment relate to the way that, for example, two cities could have similar local features without being near the same instance of that larger feature. It's the difference between "This city is near some unspecified mountain" and "This city is near Mt. Foobar." The latter provides a strong...
. The issues I'm hitting at the moment relate to the way that, for example, two cities could have similar local features without being near the same instance of that larger feature. It's the difference between "This city is near some unspecified mountain" and "This city is near Mt. Foobar." The latter provides a strong...
[ 0.0050048828125, 0.01202392578125, 0.01202392578125, 0.005584716796875, -0.009521484375, 0.01025390625, 0.0167236328125, -0.0030059814453125, -0.00970458984375, -0.01556396484375, 0.000728607177734375, 0.0205078125, 0.017333984375, 0.0184326171875, 0.01104736328125, 0.0052490234375, ...
[ 37348, 5962, 1916, 3095, 3917, 6626, 162708, 5809, 765, 21373, 4000, 66139, 15490, 8035, 43573, 5701, 110527, 150679, 60213, 7, 60212, 17721, 73243, 26349, 83, 51, 16711, 47314, 101120, 136, 18, 9572, 31, 1299, 87344, 37515, 158, 2816, 4288...
[ 0.17333984375, 0.06463623046875, 0.06689453125, 0.0694580078125, 0.0350341796875, 0.10247802734375, 0.1419677734375, 0.1063232421875, 0.054168701171875, 0.1551513671875, 0.0975341796875, 0.1934814453125, 0.1043701171875, 0.023284912109375, 0.1798095703125, 0.031463623046875, 0.115478...
embed
29103463_c1
29103463
prolog
1
(Pizza, Cost) What would I want to do: how much each paid Ask question: ?- each_paid(john, Cost). Cost = 53.8. What I think should I do: Get pizza from list in person fact Get price of pizza and add to Cost Get next pizza and go to 2 % (1) % person(john, hawaii). % person(john, pepperoni). each_paid(Person, Cost) :- pe...
(Pizza, Cost) What would I want to do: how much each paid Ask question: ?- each_paid(john, Cost). Cost = 53.8. What I think should I do: Get pizza from list in person fact Get price of pizza and add to Cost Get next pizza and go to 2 % (1) % person(john, hawaii). % person(john, pepperoni). each_paid(Person, Cost) :- pe...
[ 0.009033203125, 0.0240478515625, 0.00830078125, 0.037109375, 0.001129150390625, 0.0157470703125, -0.004119873046875, 0.01318359375, 0.02392578125, -0.02880859375, -0.0002002716064453125, -0.004425048828125, -0.0166015625, 0.01141357421875, -0.0028228759765625, 0.01416015625, 0.002792...
[ 683, 58794, 4, 63099, 2806, 3444, 54, 3642, 5045, 12638, 72090, 105219, 9655, 705, 9, 138925, 66159, 19, 2203, 8934, 52196, 5351, 5608, 20779, 32960, 1295, 5303, 23, 3445, 15824, 27167, 111, 15190, 47, 11737, 738, 116, 1745, 19896, 1573, ...
[ 0.10455322265625, 0.236083984375, 0.039703369140625, 0.28955078125, 0.0545654296875, 0.060089111328125, 0.0712890625, 0.0772705078125, 0.1318359375, 0.259521484375, 0.259033203125, 0.05767822265625, 0.045379638671875, 0.03363037109375, 0.0142974853515625, 0.271240234375, 0.171875, ...
embed
33118946_c0
33118946
prolog
0
Title: Prolog merge two lists Problem title: Prolog merge two lists Tags: list, prolog, merge, recursion Problem: Prolog merge two lists I need to merge two lists in Prolog. On input should be predicate merge/3 . Should work like this: ?- merge([6,4,b,8], [5,b,s,6], X). X = [6, 4, b, 8, 5, s]. What I have tried: %rules...
Prolog merge two lists Prolog merge two lists list prolog merge recursion Prolog Head Tmp Prolog merge two lists I need to merge two lists in Prolog. On input should be predicate merge/3 . Should work like this: What I have tried: What I get: What I expect:
[ 0.0111083984375, 0.031005859375, 0.007354736328125, 0.0201416015625, -0.004119873046875, 0.01708984375, -0.021728515625, -0.005218505859375, 0.023193359375, -0.0047607421875, 0.0087890625, 0.01904296875, -0.00140380859375, 0.009033203125, 0.0233154296875, -0.00848388671875, 0.0073242...
[ 1250, 4867, 42564, 6626, 5303, 502, 195625, 44816, 384, 2676, 3871, 107730, 1653, 2063, 67, 18113, 4488, 37842, 41206 ]
[ 0.160888671875, 0.2408447265625, 0.2452392578125, 0.147216796875, 0.2127685546875, 0.095947265625, 0.1578369140625, 0.13427734375, 0.050567626953125, 0.16650390625, 0.056884765625, 0.154541015625, 0.10400390625, 0.1329345703125, 0.0261688232421875, 0.1630859375, 0.004985809326171875,...
embed
56123649_c0
56123649
prolog
0
Title: prolog to display multiple mysql records in web Problem title: prolog to display multiple mysql records in web Tags: web, prolog, mysql Problem: prolog to display multiple mysql records in web Sorry for my English. I want to create a simple website that will take data from the mysql database and display it on th...
prolog to display multiple mysql records in web prolog to display multiple mysql records in web web prolog mysql SELECT Table Species Dbh prolog to display multiple mysql records in web Sorry for my English. I want to create a simple website that will take data from the mysql database and display it on the page. I have...
[ 0.00171661376953125, 0.01153564453125, 0.01153564453125, 0.0147705078125, 0.00433349609375, 0.021240234375, -0.004638671875, 0.000579833984375, 0.0135498046875, -0.04736328125, 0.0118408203125, -0.025390625, -0.0198974609375, -0.014404296875, 0.0093994140625, 0.00823974609375, 0.0281...
[ 502, 4867, 47, 44116, 48716, 759, 7, 99247, 115923, 23, 1467, 6755, 144832, 112997, 24990, 3387, 391, 5871, 90502, 14941, 3444, 28282, 8781, 4165, 5646, 2053, 63399, 9191, 2967, 3642, 98, 18151, 4734, 5117, 17164, 36849, 7077, 618, 2886, ...
[ 0.1636962890625, 0.2303466796875, 0.0196075439453125, 0.1756591796875, 0.2313232421875, 0.1170654296875, 0.066162109375, 0.2220458984375, 0.19580078125, 0.00799560546875, 0.1580810546875, 0.025604248046875, 0.1402587890625, 0.1533203125, 0.1331787109375, 0.0144805908203125, 0.0081787...
embed
36394590_c0
36394590
prolog
0
Title: Prolog Movie Database Problem title: Prolog Movie Database Tags: prolog Problem: Prolog Movie Database I have a the following database of facts: actor(jonny, depp, gender(male)). actor(bruce, willis, gender(male)). ... movie(year(1999), title([american,beauty]), cast([actor(kevin, spacey), actor(annette,bening),...
Prolog Movie Database Prolog Movie Database prolog Prolog Movie Database Prolog Movie Database I have a the following database of facts: I need to write a prolog query to answer the question what movies were released in or after 1999 I have tried movie(Y, M, C), member(Y, [_|year]). but it just lists all movies in the ...
[ 0.01153564453125, 0.0167236328125, 0.0107421875, 0.01068115234375, 0.00799560546875, 0.0299072265625, -0.017822265625, 0.015625, -0.01287841796875, -0.03173828125, -0.01348876953125, -0.0341796875, -0.0001468658447265625, -0.015625, -0.019287109375, 0.0135498046875, -0.00521850585937...
[ 1250, 4867, 10348, 187781, 502, 765, 25632, 63399, 15824, 7, 3871, 33022, 41, 1294, 35166, 9655, 72304, 3542, 121447, 23, 707, 7103, 8272, 37842, 14277, 1723, 276, 313, 32786, 46799, 1660, 5303, 756, 70, 11249, 831, 17, 15549, 442, 221, ...
[ 0.18115234375, 0.27001953125, 0.1180419921875, 0.196533203125, 0.1541748046875, 0.008392333984375, 0.0478515625, 0.2059326171875, 0.121826171875, 0.014617919921875, 0.03240966796875, 0.07025146484375, 0.0865478515625, 0.092529296875, 0.0626220703125, 0.0142822265625, 0.1671142578125,...
embed
66287097_c0
66287097
prolog
0
Title: How to translate a list into another in Prolog Problem title: How to translate a list into another in Prolog Tags: list, prolog Problem: How to translate a list into another in Prolog I am trying to make something like a list dictionary in Prolog. I want to transfer a list of numbers from German to English. Inpu...
How to translate a list into another in Prolog How to translate a list into another in Prolog list prolog How Prolog How to translate a list into another in Prolog I am trying to make something like a list dictionary in Prolog. I want to transfer a list of numbers from German to English. Input: trnslt([eins,drei,neun],...
[ 0.0103759765625, -0.013916015625, 0.00885009765625, 0.00238037109375, 0.00567626953125, 0.004852294921875, -0.004547119140625, 0.00054168701171875, 0.006103515625, -0.0047607421875, -0.004669189453125, -0.0084228515625, -0.015625, 0.003936767578125, 0.006866455078125, 0.004364013671875...
[ 11249, 47, 3900, 19309, 10, 5303, 3934, 15700, 23, 1250, 4867, 502, 31577, 3249, 1884, 45, 10763, 6635, 3444, 12302, 101935, 1295, 30839, 14941, 360, 7077, 4307, 1779, 1277, 13, 5425, 7090, 14, 86, 309, 1542, 13538, 1193, 2203, 3630, 10...
[ 0.055328369140625, 0.0214080810546875, 0.1739501953125, 0.2056884765625, 0.06201171875, 0.218994140625, 0.195556640625, 0.13720703125, 0.0704345703125, 0.148193359375, 0.2279052734375, 0.1016845703125, 0.029876708984375, 0.004119873046875, 0.0249481201171875, 0.01007080078125, 0.0859...
embed
42633609_c0
42633609
prolog
0
Title: what is wrong with the following prolog program Problem title: what is wrong with the following prolog program Tags: prolog Problem: what is wrong with the following prolog program I made the following program, which is this: eval([],_,_). eval([(U, V)| Tail], X, Y):- Y + evaluate([Tail], X, Y), Y is U * (X ** V...
what is wrong with the following prolog program what is wrong with the following prolog program prolog Tail ERROR Undefined _5562 _5572 _5606 exe2.pl:2 what is wrong with the following prolog program I made the following program, which is this: it returns false, and I dont know why. How can I fix it? So this eval([(4,3...
[ 0.00909423828125, 0.01611328125, 0.009033203125, -0.005340576171875, -0.00775146484375, 0.0152587890625, -0.010498046875, -0.01031494140625, 0.006683349609375, -0.02197265625, 0.005828857421875, 0.0012359619140625, 0.004791259765625, -0.01123046875, 0.00098419189453125, -0.004974365234...
[ 2367, 83, 44691, 678, 25632, 502, 4867, 1528, 1218, 379, 151206, 24638, 79912, 5983, 163406, 304, 159595, 13683, 9016, 97733, 5442, 2424, 7228, 903, 30646, 7, 98320, 13319, 3714, 15400, 30022, 28, 1405, 105801, 21320, 201, 1193, 5608, 57901...
[ 0.0294952392578125, 0.054962158203125, 0.1956787109375, 0.1180419921875, 0.1632080078125, 0.186767578125, 0.255126953125, 0.1920166015625, 0.164794921875, 0.1632080078125, 0.1353759765625, 0.081298828125, 0.08477783203125, 0.1982421875, 0.1793212890625, 0.1259765625, 0.156494140625, ...
embed
49591042_c0
49591042
prolog
0
Title: AM + PM = DAY CryptoArithmetic Puzzle Prolog Problem title: AM + PM = DAY CryptoArithmetic Puzzle Prolog Tags: cryptarithmetic-puzzle, prolog Problem: AM + PM = DAY CryptoArithmetic Puzzle Prolog I need the output to be in the format below. I have the exact output except the last line, and I cannot figure out ho...
AM + PM = DAY CryptoArithmetic Puzzle Prolog AM + PM = DAY CryptoArithmetic Puzzle Prolog cryptarithmetic-puzzle prolog DAY CryptoArithmetic Puzzle Prolog use_module Vars all_different AM + PM = DAY CryptoArithmetic Puzzle Prolog I need the output to be in the format below. I have the exact output except the last line,...
[ 0.0157470703125, -0.019287109375, 0.00506591796875, 0.03759765625, -0.0203857421875, 0.01300048828125, -0.0277099609375, 0.0086669921875, 0.010009765625, -0.018798828125, -0.01361083984375, 0.000812530517578125, 0.0128173828125, 0.022216796875, 0.007354736328125, -0.00115966796875, 0...
[ 9677, 997, 7198, 2203, 67141, 201543, 8962, 9523, 179277, 1250, 4867, 6, 136791, 1766, 13894, 133, 502, 4527, 83279, 3323, 756, 238778, 7614, 282, 3871, 140992, 23, 9384, 35064, 24763, 40494, 4568, 13315, 53418, 26366, 15190, 47, 5, 77947, ...
[ 0.18896484375, 0.1976318359375, 0.253662109375, 0.09368896484375, 0.2220458984375, 0.1507568359375, 0.1129150390625, 0.021270751953125, 0.21044921875, 0.1588134765625, 0.201904296875, 0.0165252685546875, 0.0958251953125, 0.039581298828125, 0.0770263671875, 0.004638671875, 0.106018066...
embed
54370142_c0
54370142
prolog
0
Title: Prolog sublist Relation Problem title: Prolog sublist Relation Tags: sublist, list, difference-lists, prolog Problem: Prolog sublist Relation I'm reading Ivan Bratko's Prolog Programming for Artificial Intelligence book and I have no experience with Prolog before. In book a sublist relation for a list is formula...
Prolog sublist Relation Prolog sublist Relation sublist list difference-lists prolog Prolog Relation Prolog sublist Relation I'm reading Ivan Bratko's Prolog Programming for Artificial Intelligence book and I have no experience with Prolog before. In book a sublist relation for a list is formulated as: And relation is ...
[ 0.01092529296875, 0.0026092529296875, 0.02587890625, 0.0018310546875, -0.02001953125, 0.009033203125, -0.0279541015625, 0.009033203125, 0.019287109375, -0.0118408203125, 0.00732421875, 0.02197265625, -0.007568359375, 0.004638671875, 0.006439208984375, 0.01123046875, 0.022216796875, ...
[ 1250, 4867, 1614, 6562, 116822, 5303, 60212, 502, 16454, 23698, 119794, 265, 27958, 231996, 157075, 12877, 16981, 41911, 100, 26168, 3674, 237, 34475, 37202, 70270, 15400, 8, 277, 78381, 3934, 6626, 12765, 36766, 14858, 678, 159 ]
[ 0.1468505859375, 0.2373046875, 0.220947265625, 0.258056640625, 0.212890625, 0.1959228515625, 0.1861572265625, 0.100341796875, 0.06878662109375, 0.0765380859375, 0.103271484375, 0.105712890625, 0.06787109375, 0.0787353515625, 0.0628662109375, 0.08349609375, 0.069091796875, 0.2073974...
embed
67096998_c0
67096998
prolog
0
Title: Prolog: Return list of Y from facts where X = x Problem title: Prolog: Return list of Y from facts where X = x Tags: prolog Problem: Prolog: Return list of Y from facts where X = x I'm pretty new to Prolog and can't wrap my head around a certain problem. Say I have a couple of Facts fact(X,Y) : fact(a, m). fact(...
Prolog: Return list of Y from facts where X = x Prolog: Return list of Y from facts where X = x prolog facts Prolog Prolog: Return list of Y from facts where X = x I'm pretty new to Prolog and can't wrap my head around a certain problem. Say I have a couple of Facts fact(X,Y) : fact(a, m). fact(b, m). fact(c, n). fact(...
[ 0.030517578125, 0.003814697265625, 0.0147705078125, 0.00811767578125, -0.001312255859375, 0.00872802734375, 0.0027008056640625, 0.0107421875, 0.01287841796875, -0.00982666015625, -0.000217437744140625, -0.027099609375, -0.036865234375, -0.01446533203125, 0.00060272216796875, 0.00817871...
[ 1250, 4867, 12, 173340, 5303, 111, 990, 1295, 15824, 7, 7440, 1193, 2203, 1022, 502, 28875, 3525, 47, 137565, 10336, 24233, 2967, 25916, 765, 24941, 132640, 1542, 1723, 11, 347, 653, 8096, 97, 2806, 1884, 28282, 756, 678, 29458, 89536, ...
[ 0.19140625, 0.259033203125, 0.0249176025390625, 0.2113037109375, 0.2125244140625, 0.106201171875, 0.2052001953125, 0.11279296875, 0.1895751953125, 0.0264892578125, 0.073486328125, 0.1494140625, 0.09619140625, 0.123046875, 0.154052734375, 0.0167694091796875, 0.059783935546875, 0.013...
embed
46259670_c0
46259670
prolog
0
Title: How to return duplicates from list in Prolog Problem title: How to return duplicates from list in Prolog Tags: recursion, duplicates, prolog Problem: How to return duplicates from list in Prolog I am trying to write a predicate which deletes all the unique elements of a list (and return the duplicates) like this...
How to return duplicates from list in Prolog How to return duplicates from list in Prolog recursion duplicates prolog list How Prolog delete_unique Solution How to return duplicates from list in Prolog I am trying to write a predicate which deletes all the unique elements of a list (and return the duplicates) like this...
[ -0.0289306640625, 0.026611328125, 0.03369140625, -0.017578125, 0.00003910064697265625, 0.0084228515625, 0.005523681640625, -0.0162353515625, 0.00084686279296875, -0.027587890625, -0.01129150390625, 0.00836181640625, 0.0172119140625, 0.00244140625, 0.00830078125, 0.0263671875, -0.0024...
[ 11249, 47, 30646, 171763, 1636, 1295, 5303, 1250, 4867, 23, 195625, 1830, 502, 154109, 34, 45602, 187895, 31577, 33022, 1653, 2063, 67, 8, 74635, 36998, 80854, 106073, 18151, 20697 ]
[ 0.0269775390625, 0.029998779296875, 0.1903076171875, 0.276123046875, 0.176025390625, 0.108154296875, 0.1815185546875, 0.1656494140625, 0.2391357421875, 0.0467529296875, 0.13623046875, 0.01300048828125, 0.11474609375, 0.14501953125, 0.07171630859375, 0.1951904296875, 0.0975341796875, ...
embed
23146922_c1
23146922
prolog
1
R, between(S, E)), C depends on R. Schedule(C, R, between(S, E)) :- Schedule(C, R, between (S, E)), duration(C)=<difference(E,S). This is the error I'm getting: Warning: c:/users/amir-i7/desktop/hwk11.pl:24: Singleton variables: [X] ERROR: c:/users/amir-i7/desktop/hwk11.pl:28:8: Syntax error: Operator expected ERROR: ...
R, between(S, E)), C depends on R. Schedule(C, R, between(S, E)) :- Schedule(C, R, between (S, E)), duration(C)=<difference(E,S). This is the error I'm getting: Warning: c:/users/amir-i7/desktop/hwk11.pl:24: Singleton variables: [X] ERROR: c:/users/amir-i7/desktop/hwk11.pl:28:8: Syntax error: Operator expected ERROR: ...
[ -0.01409912109375, 0.01806640625, 0.011962890625, 0.00640869140625, -0.0218505859375, 0.0034027099609375, -0.025146484375, -0.01483154296875, -0.001312255859375, -0.01397705078125, -0.021728515625, -0.002105712890625, -0.00994873046875, -0.0240478515625, -0.0040283203125, 0.01007080078...
[ 627, 17721, 294, 241, 313, 56566, 98, 230074, 441, 115, 30494, 16093, 428, 18234, 6620, 647, 3293, 18499, 20949, 5550, 592, 501, 223, 4326, 14, 966, 133850, 127, 434, 92, 1662, 2424, 25732, 43609, 1507, 77336, 1542, 151206, 28270, 1019, ...
[ 0.1619873046875, 0.25390625, 0.11962890625, 0.1412353515625, 0.1202392578125, 0.193359375, 0.02587890625, 0.275146484375, 0.1136474609375, 0.08050537109375, 0.12158203125, 0.0207672119140625, 0.048309326171875, 0.16943359375, 0.0689697265625, 0.061279296875, 0.0115966796875, 0.2135...
embed
16870784_c0
16870784
prolog
0
Title: how to shift from swiprolog to tuprolog Problem title: how to shift from swiprolog to tuprolog Tags: java, prolog, swi-prolog, tuprolog Problem: how to shift from swiprolog to tuprolog I got a .pl file through an eclipse plugin called JTransformer.The problem is that the .pl file I got is based on swiprolog and ...
how to shift from swiprolog to tuprolog how to shift from swiprolog to tuprolog java prolog swi-prolog tuprolog swiprolog how to shift from swiprolog to tuprolog I got a .pl file through an eclipse plugin called JTransformer.The problem is that the .pl file I got is based on swiprolog and now I need to do query based o...
[ 0.0213623046875, 0.0250244140625, 0.0120849609375, 0.0087890625, -0.018310546875, -0.02783203125, -0.0235595703125, 0.00194549560546875, -0.00927734375, -0.042236328125, 0.01043701171875, 0.00799560546875, -0.017333984375, 0.01239013671875, 0.015380859375, 0.0024261474609375, -0.0009...
[ 3642, 47, 122925, 1295, 91, 2452, 3454, 4867, 370, 79, 330, 502, 4163, 5, 2424, 11435, 8305, 106371, 69993, 821, 62624, 82772, 2967, 35509, 3871, 41, 23468, 55391, 831, 18, 75463, 17368, 33022, 16188, 8060, 15549, 442, 759, 26484, 22648, ...
[ 0.09326171875, 0.095458984375, 0.261962890625, 0.147705078125, 0.08721923828125, 0.2056884765625, 0.2012939453125, 0.2381591796875, 0.17724609375, 0.09930419921875, 0.162109375, 0.11474609375, 0.010833740234375, 0.039581298828125, 0.206787109375, 0.1468505859375, 0.00323486328125, ...
embed
64620033_c0
64620033
prolog
0
Title: Return the Nth oldest child from a prolog query Problem title: Return the Nth oldest child from a prolog query Tags: prolog Problem: Return the Nth oldest child from a prolog query child(john, mary). child(john, martinez). child(john, maggie). age(mary, 11). age(martinez, 12). age(maggie, 13). What I would like ...
Return the Nth oldest child from a prolog query Return the Nth oldest child from a prolog query prolog a Nth Return the Nth oldest child from a prolog query What I would like to do is define a query that returns the Nth oldest child of a person, in this case John. E.G. 1st oldest, would be Maggie. 2nd oldest would be M...
[ 0.00787353515625, -0.0004787445068359375, 0.007049560546875, -0.015380859375, -0.00180816650390625, 0.0247802734375, 0.00714111328125, -0.01416015625, 0.0146484375, -0.055419921875, 0.00164794921875, -0.0230712890625, -0.0245361328125, -0.00103759765625, -0.003387451171875, -0.00787353...
[ 173340, 541, 927, 10332, 525, 29041, 1295, 502, 4867, 41, 1294, 70, 2806, 1884, 61924, 30646, 7, 111, 3445, 903, 7225, 4939, 724, 106, 271, 186, 5695, 16857, 116, 2208, 6470, 1255, 138, 4216, 23213, 3525, 57143, 62952, 4165, 59121, 1436...
[ 0.2325439453125, 0.2235107421875, 0.2269287109375, 0.220703125, 0.21728515625, 0.253173828125, 0.06658935546875, 0.1632080078125, 0.2237548828125, 0.1552734375, 0.1842041015625, 0.0548095703125, 0.06414794921875, 0.0631103515625, 0.14013671875, 0.2144775390625, 0.032470703125, 0.01...
embed
62660678_c0
62660678
prolog
0
Title: Where is the source of my time out error (swi-prolog)? Problem title: Where is the source of my time out error (swi-prolog)? Tags: prolog, performance Problem: Where is the source of my time out error (swi-prolog)? I am having difficulty finding the source of my time-out error, when I run the following code. cro...
Where is the source of my time out error (swi-prolog)? Where is the source of my time out error (swi-prolog)? prolog performance Where string_length Where is the source of my time out error (swi-prolog)? I am having difficulty finding the source of my time-out error, when I run the following code. crossword(H1,H2,V3,V1...
[ 0.0184326171875, 0.00433349609375, -0.00677490234375, 0.0123291015625, -0.00653076171875, 0.00045013427734375, -0.00982666015625, 0.01171875, 0.01177978515625, -0.05859375, 0.02734375, -0.02783203125, 0.014404296875, 0.007568359375, 0.006561279296875, 0.004364013671875, -0.0019226074...
[ 78662, 83, 70, 31344, 111, 759, 1733, 1810, 18499, 2452, 3454, 4867, 502, 23718, 79315, 23986, 927, 19441, 34844, 90791, 9, 6056, 11675, 25632, 18151, 41421, 47416, 841, 418, 304, 856, 363, 10461, 2565, 17727, 21320, 36076, 59690, 163324, ...
[ 0.1094970703125, 0.0426025390625, 0.0677490234375, 0.240966796875, 0.102783203125, 0.08251953125, 0.2027587890625, 0.2275390625, 0.2457275390625, 0.1903076171875, 0.157958984375, 0.2264404296875, 0.1448974609375, 0.1624755859375, 0.1519775390625, 0.1055908203125, 0.027618408203125, ...
embed
62686786_c0
62686786
prolog
0
Title: Prolog: multiply list members with the previous member Problem title: Prolog: multiply list members with the previous member Tags: prolog Problem: Prolog: multiply list members with the previous member %Multiply every list Element with his previous Elemennt. %First Number stays as it is! % Example list [1,2,3,4,...
Prolog: multiply list members with the previous member Prolog: multiply list members with the previous member prolog Prolog Multiply Element Elemennt First Number Example vormulti1 Kopf Rest Neu Rest2 Kopf2 Prolog: multiply list members with the previous member The problem is the previous member. I tried ist with the K...
[ -0.0167236328125, 0.01251220703125, 0.00360107421875, 0.014404296875, -0.01904296875, 0.01068115234375, -0.0216064453125, 0.004302978515625, 0.0157470703125, -0.04638671875, 0.00555419921875, 0.00537109375, -0.0059814453125, 0.011474609375, -0.01007080078125, -0.0032501220703125, 0.0...
[ 1250, 4867, 6024, 62479, 5303, 43032, 678, 96362, 32786, 502, 19335, 48325, 12701, 10638, 23972, 103332, 89536, 1248, 144227, 58034, 49756, 11059, 304, 2967, 37842, 443, 77336, 22027, 18, 4488, 959, 110527, 71, 99, 5117, 12830 ]
[ 0.147216796875, 0.22705078125, 0.1312255859375, 0.1611328125, 0.156005859375, 0.1700439453125, 0.096923828125, 0.132568359375, 0.1937255859375, 0.1087646484375, 0.109130859375, 0.1680908203125, 0.08184814453125, 0.0187225341796875, 0.08587646484375, 0.1287841796875, 0.05126953125, ...
embed
74625183_c0
74625183
prolog
0
Title: I Want to seperate odd and even numbers in a list and print the original list along with the even and odd list Problem title: I Want to seperate odd and even numbers in a list and print the original list along with the even and odd list Tags: prolog Problem: I Want to seperate odd and even numbers in a list and ...
I Want to seperate odd and even numbers in a list and print the original list along with the even and odd list I Want to seperate odd and even numbers in a list and print the original list along with the even and odd list prolog Want even_odd Even Odd I Want to seperate odd and even numbers in a list and print the orig...
[ -0.01324462890625, 0.0218505859375, -0.0057373046875, 0.000484466552734375, -0.0172119140625, 0.039794921875, -0.01220703125, 0.0047607421875, 0.005279541015625, 0.0164794921875, 0.004791259765625, -0.04150390625, 0.0107421875, 0.017578125, -0.0022735595703125, -0.00775146484375, 0.0...
[ 87, 42335, 40, 143870, 13, 70270, 136, 3853, 101935, 23, 5303, 28412, 7311, 33233, 10, 678, 502, 4867, 13606, 31267, 67948, 19048, 84797, 1295, 51, 2886, 3444 ]
[ 0.0208740234375, 0.12841796875, 0.0859375, 0.1951904296875, 0.1033935546875, 0.2315673828125, 0.144287109375, 0.1942138671875, 0.1671142578125, 0.0240325927734375, 0.193603515625, 0.1644287109375, 0.0830078125, 0.056396484375, 0.0150604248046875, 0.010772705078125, 0.1043701171875, ...
embed
11485007_c0
11485007
prolog
0
Title: Prolog greater_than /2 succ Problem title: Prolog greater_than /2 succ Tags: prolog, successor-arithmetics Problem: Prolog greater_than /2 succ I'm new to Prolog and I'm trying to resolve this exercise: Define a predicate greater_than/2 that takes two numerals in the notation that we introduced in this lecture (...
Prolog greater_than /2 succ Prolog greater_than /2 succ prolog successor-arithmetics Prolog greater_than Prolog greater_than /2 succ I'm new to Prolog and I'm trying to resolve this exercise: This is my answer so far: but of course doesn't work properly, so I'm asking anyone for help. Thanks.
[ 0.002105712890625, 0.01031494140625, 0.0007476806640625, 0.017822265625, -0.0179443359375, 0.010986328125, 0.017578125, 0.014404296875, 0.01226806640625, -0.022216796875, 0.013916015625, 0.005706787109375, -0.01904296875, -0.007659912109375, 0.022216796875, -0.007598876953125, 0.0130...
[ 1250, 4867, 117396, 21732, 12477, 166, 10060, 502, 39457, 42, 8962, 282, 3525, 103608, 81979, 35166, 2060, 4488, 155965, 113292, 35672, 4358 ]
[ 0.16015625, 0.25537109375, 0.1353759765625, 0.1114501953125, 0.18603515625, 0.1522216796875, 0.17236328125, 0.1116943359375, 0.16455078125, 0.0831298828125, 0.1124267578125, 0.0237884521484375, 0.021636962890625, 0.092529296875, 0.1302490234375, 0.030059814453125, 0.036407470703125, ...
embed
28728465_c0
28728465
prolog
0
Title: Prolog remove element from list,weird result Problem title: Prolog remove element from list,weird result Tags: prolog Problem: Prolog remove element from list,weird result So I have this code to remove any element=X from a list. remove(X,[],L). remove(X,[X|T],Result):- remove(X,T,Result), !. remove(X,[H|T],[H|Re...
Prolog remove element from list,weird result Prolog remove element from list,weird result prolog list Prolog Result _G19 Head Tail Prolog remove element from list,weird result So I have this code to remove any element=X from a list. But when I run it, in the result I get this weird |_G19 . I understand this has to do w...
[ 0.01611328125, 0.0264892578125, 0.007537841796875, 0.0037841796875, -0.0205078125, 0.0169677734375, -0.0146484375, -0.00396728515625, 0.0078125, -0.02294921875, 0.0218505859375, -0.0172119140625, -0.013671875, -0.0035400390625, 0.0009307861328125, 0.00130462646484375, 0.03369140625, ...
[ 1250, 4867, 87388, 12830, 1295, 5303, 1177, 82249, 16750, 502, 126684, 724, 2947, 44816, 1218, 379, 18151, 2499, 1542, 11675, 903, 179459, 58745, 454, 28219, 13025, 712, 9874, 13580, 26366, 2046, 31351, 442, 44691, 44084, 305, 135179, 111, ...
[ 0.1710205078125, 0.2279052734375, 0.1680908203125, 0.2052001953125, 0.131591796875, 0.190673828125, 0.04571533203125, 0.168701171875, 0.1925048828125, 0.133056640625, 0.1505126953125, 0.09765625, 0.26318359375, 0.1611328125, 0.1505126953125, 0.12646484375, 0.121826171875, 0.0220031...
embed
29746481_c0
29746481
prolog
0
Title: swi-prolog error due to single quote in assert Problem title: swi-prolog error due to single quote in assert Tags: swi-prolog, python, prolog Problem: swi-prolog error due to single quote in assert I while trying to assert fact with single quote ' , swi-prolog gives this error: raise PrologError("".join(["Caused...
swi-prolog error due to single quote in assert swi-prolog error due to single quote in assert swi-prolog python prolog PrologError pyswip.prolog.PrologError Caused read_str.lower sub_link self.prolog_rule_identify.assertz read_str Men swi-prolog error due to single quote in assert I while trying to assert fact with sin...
[ 0.029296875, 0.0186767578125, -0.0079345703125, 0.0113525390625, -0.01953125, 0.00017261505126953125, 0.0108642578125, 0.00927734375, 0.0015106201171875, -0.0174560546875, 0.004150390625, -0.020263671875, -0.00162506103515625, -0.0128173828125, -0.002044677734375, -0.0016632080078125, ...
[ 91, 2452, 9, 3454, 4867, 18499, 4743, 11001, 66747, 23, 237, 33657, 17198, 50828, 502, 1250, 18468, 31611, 57756, 254, 10752, 2041, 12301, 9297, 17336, 56, 1614, 10187, 882, 52128, 40383, 162, 169, 1111, 47, 31577, 15824, 678, 93, 58134, ...
[ 0.053253173828125, 0.21337890625, 0.042205810546875, 0.1636962890625, 0.234375, 0.1839599609375, 0.059814453125, 0.189208984375, 0.257080078125, 0.033050537109375, 0.092041015625, 0.2235107421875, 0.049041748046875, 0.1181640625, 0.1375732421875, 0.1546630859375, 0.130126953125, 0....
embed
30142755_c0
30142755
prolog
0
Title: how should i design this predicate in prolog? Problem title: how should i design this predicate in prolog? Tags: prolog, list Problem: how should i design this predicate in prolog? I have to write a predicate called stepup(L, Z, X) , where L is a list and Z and X are the integers. It should return true if the Z ...
how should i design this predicate in prolog? how should i design this predicate in prolog? prolog list how should i design this predicate in prolog? I have to write a predicate called stepup(L, Z, X) , where L is a list and Z and X are the integers. It should return true if the Z can be stepped into X using legal step...
[ -0.035400390625, 0.00921630859375, 0.00738525390625, 0.0208740234375, -0.005645751953125, 0.023193359375, -0.001617431640625, 0.0108642578125, 0.037109375, -0.02001953125, 0.020263671875, 0.03173828125, 0.00347900390625, 0.0026092529296875, 0.005157470703125, 0.020751953125, 0.008728...
[ 3642, 5608, 17, 4331, 903, 1653, 2063, 67, 23, 502, 4867, 5303, 33022, 29954, 2037, 866, 4, 567, 1193, 339, 136, 892, 26255, 30646, 29568, 2174, 831, 2288, 48398, 3934, 8437, 98441, 38937, 305, 997, 361, 427, 2203, 2789, 72134, 14012, ...
[ 0.07342529296875, 0.085693359375, 0.05279541015625, 0.261474609375, 0.1373291015625, 0.2044677734375, 0.258056640625, 0.142333984375, 0.0782470703125, 0.1826171875, 0.2469482421875, 0.169921875, 0.1361083984375, 0.2041015625, 0.225830078125, 0.1185302734375, 0.0193939208984375, 0.1...
embed
70164490_c0
70164490
prolog
0
Title: Showing Swi-prolog backtrace? Problem title: Showing Swi-prolog backtrace? Tags: prolog, debugging, debug-backtrace, backtrace, swi-prolog Problem: Showing Swi-prolog backtrace? I figure it may not be built to do that but I might ask. I want to run a simple cli application and have it show the backtrace in case ...
Showing Swi-prolog backtrace? Showing Swi-prolog backtrace? prolog debugging debug-backtrace backtrace swi-prolog Showing Swi-prolog test.pl ERROR Arguments Showing Swi-prolog backtrace? I figure it may not be built to do that but I might ask. I want to run a simple cli application and have it show the backtrace in cas...
[ 0.0255126953125, 0.03271484375, -0.000728607177734375, 0.004180908203125, 0.00921630859375, 0.0107421875, 0.0269775390625, 0.01287841796875, 0.0008544921875, -0.016845703125, 0.00347900390625, -0.0125732421875, -0.013671875, 0.00665283203125, 0.02783203125, 0.00360107421875, 0.004547...
[ 17367, 105432, 3454, 4867, 4420, 39989, 13, 32, 214, 502, 8, 978, 85779, 12620, 91, 2452, 3034, 2424, 151206, 24638, 112140, 9, 26366, 959, 88303, 26458, 3444, 11675, 8781, 95701, 38415, 7639, 7225, 18499, 420, 177, 1542, 127877, 69236, 1...
[ 0.1473388671875, 0.25439453125, 0.1544189453125, 0.20849609375, 0.172119140625, 0.230712890625, 0.1131591796875, 0.000762939453125, 0.0235443115234375, 0.1171875, 0.0733642578125, 0.06866455078125, 0.140625, 0.10040283203125, 0.060638427734375, 0.2088623046875, 0.2060546875, 0.1639...
embed
44996220_c0
44996220
prolog
0
Title: Find progressively bigger elements in prolog list Problem title: Find progressively bigger elements in prolog list Tags: prolog, list Problem: Find progressively bigger elements in prolog list Given a prolog list I want to create a second one containing the progressively bigger elements. For example, L = [ 1, 5,...
Find progressively bigger elements in prolog list Find progressively bigger elements in prolog list prolog list Find Answer local_max Find progressively bigger elements in prolog list Given a prolog list I want to create a second one containing the progressively bigger elements. For example, My code: I thought this sho...
[ 0.0021209716796875, 0.0186767578125, 0.011962890625, 0.013671875, -0.01275634765625, 0.01300048828125, -0.021484375, -0.006988525390625, 0.022705078125, -0.03564453125, 0.0159912109375, 0.01507568359375, -0.006072998046875, -0.01019287109375, 0.025634765625, 0.00872802734375, 0.00387...
[ 26040, 161838, 538, 167785, 80854, 23, 502, 4867, 5303, 130373, 4000, 24084, 3444, 28282, 17932, 70541, 18151, 17569, 27489, 194663, 39531, 5281, 22027, 18, 98320, 24491, 892, 26255 ]
[ 0.118896484375, 0.19287109375, 0.07989501953125, 0.205322265625, 0.19921875, 0.038726806640625, 0.1353759765625, 0.2220458984375, 0.1649169921875, 0.209716796875, 0.14599609375, 0.1964111328125, 0.0145111083984375, 0.08587646484375, 0.07293701171875, 0.048126220703125, 0.089721679687...
embed
27236903_c0
27236903
prolog
0
Title: Writing a simple &quot;process of elimination&quot; Prolog code using DCGs Problem title: Writing a simple &quot;process of elimination&quot; Prolog code using DCGs Tags: prolog, dcg, zebra-puzzle Problem: Writing a simple "process of elimination" Prolog code using DCGs I have simplified a more complex problem t...
Writing a simple &quot;process of elimination&quot; Prolog code using DCGs Writing a simple &quot;process of elimination&quot; Prolog code using DCGs prolog dcg zebra-puzzle DCGs Writing Prolog Col Writing a simple "process of elimination" Prolog code using DCGs I have simplified a more complex problem to the following...
[ -0.00119781494140625, -0.01165771484375, 0.00250244140625, 0.01397705078125, 0.0103759765625, -0.004241943359375, -0.005767822265625, -0.016845703125, 0.013916015625, -0.0115966796875, -0.03564453125, 0.0096435546875, 0.0242919921875, 0.005279541015625, -0.004241943359375, 0.0294189453...
[ 213185, 8781, 63923, 111, 27169, 1363, 1250, 4867, 18151, 17368, 391, 56367, 7, 502, 104, 238, 177, 116232, 1766, 13894, 133, 11554, 112892, 1029, 1286, 27140, 2967, 70, 25632, 621, 17262, 18276, 98, 10, 48800, 678, 12921, 134855, 15, 157...
[ 0.1419677734375, 0.1439208984375, 0.140625, 0.101318359375, 0.2293701171875, 0.106689453125, 0.15869140625, 0.201904296875, 0.21533203125, 0.071044921875, 0.1439208984375, 0.244873046875, 0.0872802734375, 0.1201171875, 0.06707763671875, 0.04815673828125, 0.07989501953125, 0.1623535...
embed
6283849_c1
6283849
prolog
1
, A1) :- last_element(A, LastElement), member(LastElement, A1, R). h1(_, [], _, _) :- !. h1(Alimento, [Alimento1], [OldM], R) :- append([Alimento], [Alimento1], OldM). h1(Alimento, [Alimento1|T1], [OldM|TOldM], NewM) :- append([Alimento], [Alimento1], OldM), h1(Alimento, T1, TOldM, NewM). h2(_, [], _, _) :- !. h2(Alime...
, A1) :- last_element(A, LastElement), member(LastElement, A1, R). h1(_, [], _, _) :- !. h1(Alimento, [Alimento1], [OldM], R) :- append([Alimento], [Alimento1], OldM). h1(Alimento, [Alimento1|T1], [OldM|TOldM], NewM) :- append([Alimento], [Alimento1], OldM), h1(Alimento, T1, TOldM, NewM). h2(_, [], _, _) :- !. h2(Alime...
[ -0.033203125, 0.0224609375, -0.005096435546875, 0.037353515625, 0.00970458984375, 0.00762939453125, -0.021484375, 0.0018463134765625, 0.0299072265625, -0.0162353515625, 0.031494140625, 0.0106201171875, 0.009521484375, -0.009765625, 0.0019683837890625, -0.028076171875, 0.01806640625, ...
[ 4, 62, 17727, 15772, 4568, 62766, 132, 284, 21672, 647, 19929, 247, 32786, 2729, 271, 418, 627, 1096, 454, 101, 711, 6210, 21287, 76172, 53774, 71, 594, 114689, 25074, 618, 2356, 384, 304, 9926, 70163, 434, 86827, 1052, 4865, 83, 44691,...
[ 0.038299560546875, 0.1605224609375, 0.1488037109375, 0.1077880859375, 0.253662109375, 0.281494140625, 0.0064697265625, 0.1546630859375, 0.2357177734375, 0.07513427734375, 0.2413330078125, 0.05560302734375, 0.24462890625, 0.134765625, 0.13232421875, 0.1123046875, 0.121826171875, 0.1...
embed
32844538_c1
32844538
prolog
1
: shuffle([2,4],[2,4],[]) ? 86 69 Redo: shuffle([],[4],[4]) ? 90 70 Redo: shuffle([4],[4],[]) ? 91 71 Redo: shuffle([],[],[]) ? 92 72 Call: listReverse([],_2668) ? 93 73 Call: listReverse([],[],_2693) ? 93 73 Exit: listReverse([],[],[]) ? 92 72 Exit: listReverse([],[]) ? 94 72 Call: shuffle([],_2604,[]) ? 94 72 Exit: s...
: shuffle([2,4],[2,4],[]) ? 86 69 Redo: shuffle([],[4],[4]) ? 90 70 Redo: shuffle([4],[4],[]) ? 91 71 Redo: shuffle([],[],[]) ? 92 72 Call: listReverse([],_2668) ? 93 73 Call: listReverse([],[],_2693) ? 93 73 Exit: listReverse([],[],[]) ? 92 72 Exit: listReverse([],[]) ? 94 72 Call: shuffle([],_2604,[]) ? 94 72 Exit: s...
[ -0.01513671875, 0.0240478515625, 0.016845703125, 0.0230712890625, -0.0228271484375, 0.002288818359375, -0.0162353515625, -0.0018310546875, 0.0142822265625, 0.04296875, 0.0035552978515625, 0.037353515625, -0.004638671875, 0.0303955078125, 0.0166015625, 0.002838134765625, 0.01782226562...
[ 152, 170052, 132, 1065, 304, 617, 268, 4, 16, 705, 17281, 11937, 6096, 31, 12, 68714, 2510, 2358, 20031, 14905, 15671, 9464, 26265, 5303, 4332, 37676, 4046, 90419, 17461, 14929, 121387, 5443, 217, 16064, 7709, 9365, 12045, 2248, 12661, 17...
[ 0.0889892578125, 0.316162109375, 0.03363037109375, 0.004058837890625, 0.0968017578125, 0.184814453125, 0.0255279541015625, 0.015167236328125, 0.00482177734375, 0.02630615234375, 0.216552734375, 0.1837158203125, 0.1202392578125, 0.161376953125, 0.013031005859375, 0.10302734375, 0.1883...
embed
15127792_c0
15127792
prolog
0
Title: comparing in prolog Problem title: comparing in prolog Tags: prolog Problem: comparing in prolog I have following knowledge base team_name(1, conneticut). team_name(2, duke). team_name(3, memphis). team_name(4, villanova). team_name(5,gonzaga). win_lose(1,22,2). win_lose(2,24,1). win_lose(3,23,2). win_lose(4,20,...
comparing in prolog comparing in prolog prolog team_name win_lose comparing in prolog I have following knowledge base I want to write a query that allows the team with most wing play against the team with the least wins, which both are in the same zone, and the home team is the one with most wins I have the following i...
[ -0.0005035400390625, 0.003265380859375, -0.003936767578125, 0.0213623046875, 0.00445556640625, 0.00830078125, -0.0023193359375, -0.000308990478515625, 0.0107421875, 0.02197265625, 0.043701171875, 0.01165771484375, 0.001129150390625, -0.0162353515625, 0.00167083740234375, -0.01165771484...
[ 37397, 214, 23, 502, 4867, 7175, 11627, 19916, 59453, 25632, 51359, 3647, 3444, 33022, 41, 1294, 114864, 2684, 14775, 11301, 26548, 19713, 15044, 5701, 20288, 5368, 678, 959, 4488 ]
[ 0.197998046875, 0.08245849609375, 0.08636474609375, 0.141357421875, 0.2239990234375, 0.1181640625, 0.1002197265625, 0.1392822265625, 0.1328125, 0.09912109375, 0.0360107421875, 0.06500244140625, 0.0241241455078125, 0.04638671875, 0.090576171875, 0.1025390625, 0.045654296875, 0.12109...
embed
18816058_c0
18816058
prolog
0
Title: Constraint logic programming with sets in Prolog Problem title: Constraint logic programming with sets in Prolog Tags: constraint-programming, prolog, set, logic-programming Problem: Constraint logic programming with sets in Prolog The clpfd is a constraint programming library for integers in SWI Prolog. Is ther...
Constraint logic programming with sets in Prolog Constraint logic programming with sets in Prolog constraint-programming prolog set logic-programming Constraint Prolog Constraint logic programming with sets in Prolog The clpfd is a constraint programming library for integers in SWI Prolog. Is there a similar library fo...
[ 0.00946044921875, 0.005523681640625, 0.0115966796875, 0.00848388671875, -0.0107421875, 0.00445556640625, 0.00089263916015625, -0.01025390625, -0.01397705078125, -0.03955078125, -0.01470947265625, 0.004302978515625, -0.01043701171875, -0.004119873046875, 0.01495361328125, 0.01513671875,...
[ 1657, 2816, 4288, 62775, 56037, 678, 5423, 1250, 4867, 158, 28966, 502, 33139, 39557, 71, 83, 449, 35773, 1294, 100, 892, 26255, 159, 38969, 21373, 38440, 80234, 29479, 54, 2886, 16487, 107730, 6183, 176377, 33946, 66747, 157318, 5045, 1152...
[ 0.08538818359375, 0.2166748046875, 0.1741943359375, 0.1885986328125, 0.1663818359375, 0.06219482421875, 0.212158203125, 0.1448974609375, 0.2325439453125, 0.097900390625, 0.120849609375, 0.0849609375, 0.1192626953125, 0.1646728515625, 0.2015380859375, 0.032073974609375, 0.027511596679...
embed
70238387_c1
70238387
prolog
1
space for the reading of chars within? In case it helps just consider terms sampleterm/1 . So consider the reading of all such terms written in canonical form. And, if you like, formulate it as a DCG. sampleterm([]). sampleterm(a). sampleterm(b). sampleterm('.'(E,Es)) :- % the real list constructor sampleterm(E), samp...
space for the reading of chars within? In case it helps just consider terms sampleterm/1 . So consider the reading of all such terms written in canonical form. And, if you like, formulate it as a DCG. sampleterm([]). sampleterm(a). sampleterm(b). sampleterm('.'(E,Es)) :- % the real list constructor sampleterm(E), samp...
[ 0.0272216796875, 0.006378173828125, 0.01025390625, 0.01263427734375, -0.011474609375, 0.000652313232421875, 0.008544921875, -0.00347900390625, 0.00390625, -0.0145263671875, 0.0245361328125, -0.0048828125, -0.014404296875, -0.0155029296875, -0.0247802734375, 0.01068115234375, -0.00518...
[ 32628, 100, 70, 16454, 111, 21441, 7, 28032, 112397, 16916, 69407, 121413, 32166, 11583, 756, 59121, 74413, 21533, 3173, 1884, 26168, 391, 56367, 11, 275, 16474, 1745, 2773, 5303, 64549, 748, 647, 919, 724, 110, 93766, 7722, 76519, 8060, ...
[ 0.26904296875, 0.0626220703125, 0.00799560546875, 0.25927734375, 0.006866455078125, 0.2230224609375, 0.07769775390625, 0.2071533203125, 0.120849609375, 0.10272216796875, 0.1925048828125, 0.1671142578125, 0.228271484375, 0.1697998046875, 0.040435791015625, 0.09625244140625, 0.09814453...
embed
14594928_c0
14594928
prolog
0
Title: Prolog list membership, multiple results returned Problem title: Prolog list membership, multiple results returned Tags: swi-prolog, prolog-toplevel, prolog Problem: Prolog list membership, multiple results returned I have a standard procedure for determining membership of a list: member(X, [X|_]). member(X, [_|...
Prolog list membership, multiple results returned Prolog list membership, multiple results returned swi-prolog prolog-toplevel prolog Prolog Prolog list membership, multiple results returned I have a standard procedure for determining membership of a list: What I don't understand is why when I pose the following query:...
[ 0.0201416015625, 0.0185546875, 0.019287109375, 0.023681640625, -0.02734375, -0.00177764892578125, 0.01092529296875, 0.004852294921875, 0.0003871917724609375, -0.017578125, 0.00433349609375, -0.0145263671875, -0.0036163330078125, 0.01116943359375, 0.00537109375, 0.0052490234375, 0.022...
[ 1250, 4867, 5303, 209274, 48716, 50339, 176377, 2452, 3454, 502, 13784, 67919, 5570, 50491, 72694, 214, 28219, 15400, 19064, 41, 1294, 16750, 2806, 17569, 40407, 69236, 17368, 5117, 79986, 162, 10, 10336, 87599, 3564, 111, 2174, 81887, 17932,...
[ 0.16357421875, 0.2410888671875, 0.192626953125, 0.23828125, 0.1864013671875, 0.18896484375, 0.13671875, 0.1075439453125, 0.0955810546875, 0.0911865234375, 0.00701904296875, 0.09991455078125, 0.09991455078125, 0.088134765625, 0.106201171875, 0.000457763671875, 0.072509765625, 0.0305...
embed
78917389_c0
78917389
prolog
0
Title: Getting the seed set by the ECLiPSe on loading Problem title: Getting the seed set by the ECLiPSe on loading Tags: prolog, eclipse-clp Problem: Getting the seed set by the ECLiPSe on loading I would like to get the seed that is used by ECLiPSe when it loads. I know how to set it via seed/1 but I do not know how ...
Getting the seed set by the ECLiPSe on loading Getting the seed set by the ECLiPSe on loading prolog eclipse-clp Getting ECLiPSe Getting the seed set by the ECLiPSe on loading I would like to get the seed that is used by ECLiPSe when it loads. I know how to set it via seed/1 but I do not know how to query it if I have ...
[ 0.0252685546875, 0.01239013671875, 0.01611328125, 0.02001953125, -0.00014591217041015625, -0.0025177001953125, 0.00360107421875, 0.01397705078125, -0.021728515625, -0.07421875, 0.004302978515625, 0.0233154296875, -0.0106201171875, 0.01434326171875, 0.0079345703125, 0.013427734375, -0...
[ 210732, 40, 297, 5423, 390, 59947, 9506, 9059, 13, 98, 72367, 214, 502, 4867, 28, 106371, 184, 26775, 1884, 2046, 70, 11814, 3229, 442, 1829, 11583, 3714, 41, 2174, 765, 959, 456, 3996, 3134, 114453, 50336, 52490, 42238, 4127, 33938, 16...
[ 0.1136474609375, 0.16845703125, 0.2232666015625, 0.19921875, 0.04925537109375, 0.140869140625, 0.2044677734375, 0.169677734375, 0.1754150390625, 0.0689697265625, 0.1998291015625, 0.0751953125, 0.11279296875, 0.1873779296875, 0.00335693359375, 0.19287109375, 0.1104736328125, 0.12536...
embed
68072285_c0
68072285
prolog
0
Title: Prolog Nested Query Problem title: Prolog Nested Query Tags: python, prolog Problem: Prolog Nested Query I am calling one Prolog function which returns a list. I traverse the list using a Python loop and do somethings. In the same loop, when I catch a specific condition, I call another Prolog function. I tried t...
Prolog Nested Query Prolog Nested Query python prolog Prolog Nested Query Prolog Nested Query I am calling one Prolog function which returns a list. I traverse the list using a Python loop and do somethings. In the same loop, when I catch a specific condition, I call another Prolog function. I tried to execute this cod...
[ 0.0087890625, 0.0096435546875, -0.0081787109375, 0.017822265625, 0.011474609375, 0.0167236328125, -0.007720947265625, -0.004302978515625, 0.006561279296875, -0.051513671875, 0.01361083984375, -0.011962890625, -0.019775390625, 0.0169677734375, 0.018798828125, -0.0021514892578125, 0.01...
[ 1250, 4867, 28701, 71, 58836, 53, 17198, 50828, 502, 159029, 1632, 32354, 30646, 5303, 37317, 13, 145581, 40956, 9844, 5701, 105556, 29458, 35431, 11782, 15700, 37842, 71924, 18151, 11001, 36746, 18499, 4527, 17932, 77336, 75414, 41, 6626, 41...
[ 0.19482421875, 0.278076171875, 0.2406005859375, 0.1070556640625, 0.2100830078125, 0.04083251953125, 0.0755615234375, 0.1151123046875, 0.1707763671875, 0.12451171875, 0.08624267578125, 0.1722412109375, 0.1346435546875, 0.1573486328125, 0.133056640625, 0.012725830078125, 0.207641601562...
embed
51644881_c0
51644881
prolog
0
Title: Prolog Query Duplicates Problem title: Prolog Query Duplicates Tags: prolog-setof, prolog, prolog-tabling Problem: Prolog Query Duplicates I've seen a few questions on this topic, however none of them really answers my question properly. I'll write a small example, here are some facts: football(john). football(s...
Prolog Query Duplicates Prolog Query Duplicates prolog-setof prolog prolog-tabling Prolog Query Duplicates Prolog Query Duplicates I've seen a few questions on this topic, however none of them really answers my question properly. I'll write a small example, here are some facts: I want to create a rule that states pete ...
[ 0.0235595703125, 0.0164794921875, 0.010498046875, 0.0027618408203125, -0.01495361328125, -0.0032501220703125, -0.00182342529296875, -0.0035400390625, 0.000926971435546875, -0.049560546875, -0.0233154296875, 0.00408935546875, 0.01202392578125, 0.00897216796875, -0.0050048828125, 0.03393...
[ 1250, 4867, 58836, 53, 786, 52721, 1636, 502, 3509, 4390, 102, 79298, 10846, 17582, 903, 28451, 155965, 19336, 27781, 15824, 3444, 28282, 10, 79986, 117249, 280, 67, 1884, 35672, 450, 11301, 101740, 707, 69686, 4966, 171259, 41, 1294, 35254...
[ 0.19140625, 0.253173828125, 0.2386474609375, 0.1287841796875, 0.177978515625, 0.251708984375, 0.0965576171875, 0.15771484375, 0.12255859375, 0.0447998046875, 0.10198974609375, 0.091796875, 0.013824462890625, 0.00274658203125, 0.003509521484375, 0.041473388671875, 0.0282745361328125, ...
embed
37255494_c1
37255494
prolog
1
's This is my input: printBoard([[a,-,-,-,-,-,-],[b,-,-,-,-,-,-],[c,-,-,-,-,-,-],[d,-,-,-,-,-,-],[e,-,-,-,-,-,-],[f,-,-,-,-,-,-]]). This is my output actualy But I want you out: A B C D E F G a b c d e f g - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - in the end I 've done it this way printBoard...
's This is my input: printBoard([[a,-,-,-,-,-,-],[b,-,-,-,-,-,-],[c,-,-,-,-,-,-],[d,-,-,-,-,-,-],[e,-,-,-,-,-,-],[f,-,-,-,-,-,-]]). This is my output actualy But I want you out: A B C D E F G a b c d e f g - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - in the end I 've done it this way printBoard...
[ -0.008056640625, -0.01092529296875, 0.00897216796875, 0.006439208984375, -0.02294921875, 0.00017547607421875, -0.000762939453125, 0.0072021484375, 0.007171630859375, 0.00933837890625, 0.01300048828125, 0.014892578125, -0.000675201416015625, -0.0037384033203125, -0.037109375, 0.00698852...
[ 242, 7, 3293, 83, 759, 107730, 28412, 12647, 5861, 132, 1065, 11, 9, 275, 238, 71, 420, 140992, 8561, 53, 4966, 87, 3444, 398, 1810, 12, 62, 335, 313, 391, 241, 563, 527, 501, 104, 1238, 706, 3564, 272, 16940, 442, 903, 3917, 618,...
[ 0.0994873046875, 0.081787109375, 0.04718017578125, 0.032958984375, 0.0662841796875, 0.2391357421875, 0.254638671875, 0.1944580078125, 0.2548828125, 0.0372314453125, 0.0103759765625, 0.038787841796875, 0.061309814453125, 0.050384521484375, 0.033050537109375, 0.0772705078125, 0.0864868...
embed
57968775_c0
57968775
prolog
0
Title: Problem with getting a list as an aswer in pyswip Problem title: Problem with getting a list as an aswer in pyswip Tags: python, prolog Problem: Problem with getting a list as an aswer in pyswip I've just started tinkering with Pyswip trying to integrate a Prolog knowledge base into a Python program. It seemed t...
Problem with getting a list as an aswer in pyswip Problem with getting a list as an aswer in pyswip python prolog pyswip Prolog Problem p.assertz p.query Out Atom Problem with getting a list as an aswer in pyswip I've just started tinkering with Pyswip trying to integrate a Prolog knowledge base into a Python program. ...
[ 0.0196533203125, 0.0166015625, 0.00022220611572265625, 0.02392578125, -0.0284423828125, 0.000812530517578125, -0.01251220703125, 0.0006866455078125, -0.01129150390625, -0.034912109375, 0.0128173828125, 0.0067138671875, -0.02197265625, -0.004180908203125, 0.0009307861328125, 0.004852294...
[ 15649, 678, 20949, 10, 5303, 237, 142, 6488, 57756, 2452, 254, 23, 17198, 50828, 502, 4867, 1250, 915, 162, 33657, 169, 944, 1294, 13538, 69728, 49947, 27512, 7, 78779, 51359, 3647, 145581, 1528, 115058, 4488, 156100, 2046, 34292, 27781, ...
[ 0.131591796875, 0.001953125, 0.095703125, 0.012908935546875, 0.23681640625, 0.134033203125, 0.063720703125, 0.2227783203125, 0.149658203125, 0.2060546875, 0.1741943359375, 0.0382080078125, 0.008819580078125, 0.050323486328125, 0.06768798828125, 0.19775390625, 0.09954833984375, 0.05...
embed
40711481_c0
40711481
prolog
0
Title: How to write unflatten function in prolog? Problem title: How to write unflatten function in prolog? Tags: debugging, prolog, algorithm, computer-science Problem: How to write unflatten function in prolog? The solution I came up with checks the left and right side, to make sure the left side is flattened and the...
How to write unflatten function in prolog? How to write unflatten function in prolog? debugging prolog algorithm computer-science How How to write unflatten function in prolog? The solution I came up with checks the left and right side, to make sure the left side is flattened and the right side for all possible partiti...
[ 0.00153350830078125, 0.02490234375, 0.01007080078125, -0.00010061264038085938, -0.0220947265625, 0.0147705078125, -0.001190185546875, -0.00061798095703125, -0.0003490447998046875, 0.005767822265625, -0.0029449462890625, -0.006195068359375, 0.00579833984375, -0.005645751953125, 0.00723266...
[ 11249, 33022, 51, 150632, 510, 32354, 502, 4867, 47, 8, 978, 234873, 175201, 23, 29806, 12765, 25737, 7108, 5609, 9077, 83, 49878, 7722, 2878, 5256, 5490, 18499, 41929, 8512, 12830 ]
[ 0.03704833984375, 0.188720703125, 0.1343994140625, 0.1983642578125, 0.191162109375, 0.1956787109375, 0.1519775390625, 0.2318115234375, 0.001373291015625, 0.05169677734375, 0.07281494140625, 0.068603515625, 0.003387451171875, 0.025634765625, 0.0478515625, 0.1376953125, 0.0894775390625...
embed
16223206_c0
16223206
prolog
0
Title: Instantiation error when comparing two different values Problem title: Instantiation error when comparing two different values Tags: comparison, instantiation, prolog Problem: Instantiation error when comparing two different values I've got a predicate that looks like the following: condition_met([(X + 1) < 5 | ...
Instantiation error when comparing two different values Instantiation error when comparing two different values comparison instantiation prolog Instantiation condition_met Rest Temp Instantiation error when comparing two different values I've got a predicate that looks like the following: at(X,Y) is something I assert ...
[ 0.00176239013671875, 0.017333984375, -0.0017547607421875, -0.017333984375, 0.0008392333984375, 0.00653076171875, 0.00689697265625, -0.0036773681640625, 0.0130615234375, -0.01171875, 0.030517578125, 0.0142822265625, 0.00616455078125, 0.00701904296875, 0.0216064453125, 0.0079345703125, ...
[ 166945, 14, 2320, 18499, 3229, 37397, 214, 6626, 12921, 142424, 225490, 34648, 502, 4867, 35431, 1928, 49756, 37446, 1653, 2063, 33342, 1884, 99, 1542, 4, 1723, 87, 237, 33657, 8108, 51042, 41, 1294, 14012, 2806, 3249, 29568, 127877, 5885, ...
[ 0.154541015625, 0.1639404296875, 0.07586669921875, 0.193359375, 0.0164031982421875, 0.2015380859375, 0.09283447265625, 0.1416015625, 0.130615234375, 0.168701171875, 0.189453125, 0.1390380859375, 0.0831298828125, 0.11865234375, 0.130859375, 0.114990234375, 0.145751953125, 0.16320800...
embed
17684895_c0
17684895
prolog
0
Title: Ignore type errors in prolog and return false instead Problem title: Ignore type errors in prolog and return false instead Tags: prolog, clpfd Problem: Ignore type errors in prolog and return false instead I want the prolog engine to return false instead of an error. I have this code: :-use_module(library(clpfd)...
Ignore type errors in prolog and return false instead Ignore type errors in prolog and return false instead prolog clpfd Ignore use_module set_1 ERROR Type Ignore type errors in prolog and return false instead I want the prolog engine to return false instead of an error. I have this code: When I query p, I get an error...
[ 0.009765625, 0.01611328125, 0.01446533203125, 0.005828857421875, -0.0189208984375, -0.004241943359375, 0.00457763671875, 0.0069580078125, -0.0098876953125, -0.02099609375, 0.007537841796875, -0.0216064453125, 0.00604248046875, 0.0145263671875, 0.0181884765625, 0.00872802734375, -0.01...
[ 87, 11137, 107, 10644, 18499, 23, 502, 4867, 30646, 98320, 64457, 33139, 39557, 71, 4527, 83279, 5423, 115187, 151206, 24638, 60457, 7, 3444, 87907, 18151, 41, 1294, 915, 140992, 6713, 1884, 2806, 41206, 1957, 15549, 32786, 1542, 420, 27750...
[ 0.011138916015625, 0.1376953125, 0.0643310546875, 0.208740234375, 0.1968994140625, 0.0305938720703125, 0.1568603515625, 0.21630859375, 0.1781005859375, 0.2200927734375, 0.1146240234375, 0.00982666015625, 0.03497314453125, 0.056060791015625, 0.05181884765625, 0.0809326171875, 0.088256...
embed
32739805_c0
32739805
prolog
0
Title: use prolog to solve arithmetic expression Problem title: use prolog to solve arithmetic expression Tags: arithmetic-expressions, prolog Problem: use prolog to solve arithmetic expression i am a novice in Prolog.Now I want to use Prolog to solve arithmetic expression problems. suppose we have a predicate like thi...
use prolog to solve arithmetic expression use prolog to solve arithmetic expression arithmetic-expressions prolog Val Sol use prolog to solve arithmetic expression i am a novice in Prolog.Now I want to use Prolog to solve arithmetic expression problems. suppose we have a predicate like this: expr(E,Val,Var,Sol) the fir...
[ 0.004730224609375, -0.0067138671875, -0.00140380859375, 0.0169677734375, 0.0032501220703125, 0.03173828125, -0.002716064453125, 0.0179443359375, -0.0013580322265625, -0.0233154296875, -0.0014801025390625, 0.0203857421875, -0.0059814453125, 0.0166015625, 0.0157470703125, -0.003128051757...
[ 4527, 502, 4867, 47, 86869, 187, 8962, 282, 9523, 125195, 204629, 4769, 6678, 95968, 1250, 3444, 44402, 139124, 1653, 2063, 14700, 42, 647, 42272, 81827, 102588, 5117, 34292, 50960, 77336, 16750, 26458, 86827, 1328, 425, 304, 294, 35166, 15...
[ 0.1177978515625, 0.1883544921875, 0.278076171875, 0.04888916015625, 0.189697265625, 0.036468505859375, 0.1234130859375, 0.10736083984375, 0.07037353515625, 0.23681640625, 0.2108154296875, 0.1856689453125, 0.2252197265625, 0.062225341796875, 0.188232421875, 0.04730224609375, 0.1431884...
embed
17928777_c0
17928777
prolog
0
Title: How to define integer lists Problem title: How to define integer lists Tags: prolog Problem: How to define integer lists I have a problem shown below. Define integer list as follows: the empty list is an integer list if L is an integer list and N is an integer then [N | L] is an integer list if L1 and L2 are int...
How to define integer lists How to define integer lists prolog How integer_list int_list is_list How to define integer lists I have a problem shown below. Define integer list as follows: the empty list is an integer list if L is an integer list and N is an integer then [N | L] is an integer list if L1 and L2 are intege...
[ -0.007415771484375, -0.00701904296875, -0.004425048828125, 0.01171875, -0.016357421875, 0.0162353515625, -0.025634765625, -0.012939453125, 0.01507568359375, -0.0177001953125, 0.00921630859375, -0.018310546875, -0.019287109375, 0.025390625, 0.0208740234375, 0.0189208984375, 0.03735351...
[ 11249, 47, 61924, 892, 1505, 5303, 7, 502, 4867, 6562, 23, 18, 83, 2967, 35064, 262, 64552, 201505, 142, 339, 541, 839, 304, 866, 418, 90173, 1528, 214521, 53418, 29479, 138, 4216, 64209, 121742 ]
[ 0.0308074951171875, 0.027008056640625, 0.2191162109375, 0.169921875, 0.1905517578125, 0.261962890625, 0.0899658203125, 0.138671875, 0.181396484375, 0.2071533203125, 0.0628662109375, 0.0985107421875, 0.054840087890625, 0.044464111328125, 0.0217132568359375, 0.10162353515625, 0.1702880...
embed
40591783_c0
40591783
prolog
0
Title: How to use JPL (bidirectional Java/Prolog interface) on Linux? Problem title: How to use JPL (bidirectional Java/Prolog interface) on Linux? Tags: jpl, swi-prolog, java, linux, prolog Problem: How to use JPL (bidirectional Java/Prolog interface) on Linux? I'm interested in embedding a Prolog interpreter in Java....
How to use JPL (bidirectional Java/Prolog interface) on Linux? How to use JPL (bidirectional Java/Prolog interface) on Linux? jpl swi-prolog java linux prolog How JPL Java Prolog Linux How to use JPL (bidirectional Java/Prolog interface) on Linux? I'm interested in embedding a Prolog interpreter in Java. One option is ...
[ 0.0033721923828125, 0.0267333984375, 0.00848388671875, 0.01080322265625, -0.0208740234375, 0.004913330078125, 0.012451171875, -0.006927490234375, -0.01043701171875, -0.034423828125, -0.00482177734375, -0.004852294921875, -0.017333984375, -0.0038299560546875, -0.00506591796875, 0.010864...
[ 11249, 47, 4527, 821, 21130, 964, 80581, 110117, 41925, 64, 10752, 4867, 101758, 98, 29908, 1647, 2424, 91, 2452, 3454, 79, 330, 11508, 6077, 502, 1250, 60892, 55720, 59725, 29481, 56, 23, 35829, 17368, 7026, 22317, 148431, 59720, 5, 5083...
[ 0.093017578125, 0.078857421875, 0.1744384765625, 0.186279296875, 0.287109375, 0.1141357421875, 0.1153564453125, 0.062255859375, 0.24609375, 0.053375244140625, 0.1553955078125, 0.2247314453125, 0.1834716796875, 0.1273193359375, 0.266357421875, 0.1142578125, 0.2130126953125, 0.016601...
embed
41250604_c0
41250604
prolog
0
Title: Why does the is/2 predicate unifies a variable with zero? Problem title: Why does the is/2 predicate unifies a variable with zero? Tags: prolog Problem: Why does the is/2 predicate unifies a variable with zero? I'm trying to figure out why this piece of code actually works well. I don't understand anything of wh...
Why does the is/2 predicate unifies a variable with zero? Why does the is/2 predicate unifies a variable with zero? prolog Why Tail Counter Counter1 Why does the is/2 predicate unifies a variable with zero? I'm trying to figure out why this piece of code actually works well. I don't understand anything of what's going ...
[ 0.006134033203125, -0.003082275390625, 0.00970458984375, 0.0150146484375, -0.0072021484375, 0.017333984375, 0.001953125, -0.00927734375, 0.0194091796875, -0.005859375, 0.00653076171875, -0.005035400390625, 0.0185546875, 0.002685546875, 0.01904296875, -0.007049560546875, 0.02746582031...
[ 44084, 83, 12477, 1653, 2063, 67, 51, 27430, 90, 77336, 678, 45234, 502, 4867, 1218, 379, 197956, 418, 14602, 70, 26366, 15400, 63847, 18151, 20653, 43240, 5299, 28219, 3642, 757, 106, 10422, 25632, 6626, 91736, 61924, 14012, 132887, 647, ...
[ 0.126708984375, 0.15673828125, 0.268310546875, 0.179931640625, 0.177490234375, 0.0726318359375, 0.163818359375, 0.167724609375, 0.044952392578125, 0.2401123046875, 0.10577392578125, 0.21923828125, 0.053985595703125, 0.103271484375, 0.1087646484375, 0.14111328125, 0.2232666015625, 0...
embed
52976221_c0
52976221
prolog
0
Title: Take list as input from user, and use it in other predicates like append, and some other which I want to implement a code Problem title: Take list as input from user, and use it in other predicates like append, and some other which I want to implement a code Tags: prolog Problem: Take list as input from user, an...
Take list as input from user, and use it in other predicates like append, and some other which I want to implement a code Take list as input from user, and use it in other predicates like append, and some other which I want to implement a code prolog user Take list1 list2 _3842 _3848 _3854 _3866 _3872 Take list as inpu...
[ 0.0013885498046875, -0.0048828125, 0.01080322265625, 0.02001953125, -0.00537109375, 0.017333984375, 0.01171875, 0.029541015625, 0.01153564453125, -0.038330078125, 0.0196533203125, 0.004241943359375, -0.017333984375, 0.005584716796875, 0.01177978515625, 0.0003490447998046875, 0.031982...
[ 46673, 5303, 237, 107730, 1295, 38937, 4527, 3789, 1653, 2063, 114689, 71, 3444, 29479, 18151, 442, 502, 4867, 418, 304, 117180, 363, 195586, 156204, 183461, 113252, 23, 140992, 83, 4966, 87, 186, 3638, 76569, 4626, 7 ]
[ 0.14892578125, 0.2301025390625, 0.11376953125, 0.2239990234375, 0.1295166015625, 0.1768798828125, 0.123779296875, 0.050689697265625, 0.142822265625, 0.17236328125, 0.1702880859375, 0.1199951171875, 0.1512451171875, 0.1748046875, 0.183349609375, 0.0233154296875, 0.1219482421875, 0.1...
embed
9624788_c0
9624788
prolog
0
Title: using prolog to generate sentences Problem title: using prolog to generate sentences Tags: prolog Problem: using prolog to generate sentences Consider the following list of states: [Sin,S2,S3,...,Sout] and following rules: it is possible to go back from S(n) to S(n-1) if there is such S(n-1) it is not possible t...
using prolog to generate sentences using prolog to generate sentences prolog prolog d using prolog to generate sentences Consider the following list of states: [Sin,S2,S3,...,Sout] and following rules: it is possible to go back from S(n) to S(n-1) if there is such S(n-1) it is not possible to go back from S(out) a sent...
[ 0.02880859375, 0.029296875, -0.0011444091796875, 0.0140380859375, -0.00689697265625, 0.00848388671875, -0.0230712890625, 0.0211181640625, -0.00579833984375, -0.06103515625, 0.01129150390625, 0.01007080078125, -0.0159912109375, 0.01104736328125, 0.01513671875, -0.01007080078125, -0.00...
[ 17368, 502, 4867, 139392, 149357, 47, 104, 5303, 117249, 294, 73, 304, 363, 6056, 91736, 7722, 738, 4420, 1295, 159, 19, 110218, 6044, 11343, 9842, 3564, 1884, 79986, 34704, 12620, 7, 26950, 5941, 20028, 107003, 238, 71 ]
[ 0.04559326171875, 0.154541015625, 0.2476806640625, 0.1988525390625, 0.209716796875, 0.032073974609375, 0.0882568359375, 0.115234375, 0.1656494140625, 0.01458740234375, 0.124267578125, 0.0413818359375, 0.07415771484375, 0.1478271484375, 0.0927734375, 0.05108642578125, 0.01780700683593...
embed
10063516_c0
10063516
prolog
0
Title: list length, inserting element Problem title: list length, inserting element Tags: prolog, list Problem: list length, inserting element I'm trying to write a program in Prolog, which will insert an element into a certain position, so e.g. ?- ins(a, [1,2,3,4,5], 3, X). X = [1,2,a,3,4,5]. I have the following code...
list length, inserting element list length, inserting element prolog list OUT list length, inserting element I'm trying to write a program in Prolog, which will insert an element into a certain position, so e.g. I have the following code: The problem is that it is inserting element X in given index from back (I even kn...
[ -0.002044677734375, 0.0196533203125, 0.01043701171875, 0.018310546875, -0.028076171875, 0.033935546875, -0.03125, 0.001708984375, 0.0194091796875, -0.038818359375, 0.01556396484375, -0.034423828125, -0.0027313232421875, -0.0050048828125, -0.01348876953125, 0.004608154296875, 0.032226...
[ 5303, 140909, 183540, 214, 12830, 502, 4867, 52001, 31577, 33022, 1528, 1250, 24233, 19069, 25632, 18151, 2967, 1193, 23, 34475, 63262, 1295, 4420, 3714, 618, 96386, 683, 171259, 10336, 47, 37629, 3642, 5045, 80854, 59226, 5773, 2606, 1297, ...
[ 0.1749267578125, 0.1846923828125, 0.1968994140625, 0.04931640625, 0.1884765625, 0.140869140625, 0.228759765625, 0.1964111328125, 0.06103515625, 0.0819091796875, 0.1339111328125, 0.166748046875, 0.023284912109375, 0.1119384765625, 0.00048828125, 0.11279296875, 0.111083984375, 0.1219...
embed
40147023_c0
40147023
prolog
0
Title: Complex list manipulation Problem title: Complex list manipulation Tags: prolog, list Problem: Complex list manipulation Background I am having the following code that will take out the first list element in an inner list. Example: getFirstElement([[1, data1], [[2, data2], [3, data3], [[4, data4], [5, data5]]] ]...
Complex list manipulation Complex list manipulation prolog list Complex Complex list manipulation Background I am having the following code that will take out the first list element in an inner list. Example: getFirstElement([[1, data1], [[2, data2], [3, data3], [[4, data4], [5, data5]]] ], O) O will be returned as [2]...
[ 0.0174560546875, 0.0228271484375, -0.0091552734375, 0.0216064453125, -0.006317138671875, -0.01092529296875, -0.00142669677734375, 0.0135498046875, 0.0152587890625, -0.0159912109375, 0.00518798828125, -0.004791259765625, -0.015869140625, 0.00677490234375, -0.00604248046875, 0.0139160156...
[ 113197, 5303, 45258, 502, 4867, 64330, 19441, 25632, 18151, 5646, 1810, 5117, 12830, 75414, 89536, 2046, 207263, 647, 19929, 418, 2053, 76172, 304, 617, 758, 180, 176377, 237, 33579, 11249, 65042, 123309, 1221, 30646, 111, 756, 74918, 47754, ...
[ 0.1900634765625, 0.191162109375, 0.1669921875, 0.10345458984375, 0.17236328125, 0.0458984375, 0.0251617431640625, 0.039306640625, 0.14892578125, 0.03826904296875, 0.1243896484375, 0.1168212890625, 0.155029296875, 0.1553955078125, 0.1043701171875, 0.0888671875, 0.13134765625, 0.0582...
embed
61483884_c0
61483884
prolog
0
Title: Run length encoding using prolog Problem title: Run length encoding using prolog Tags: run-length-encoding, prolog Problem: Run length encoding using prolog I am starting to learn Prolog by solving different example. I am doing run length encoding on text data using Prolog, which should produce a character follo...
Run length encoding using prolog Run length encoding using prolog run-length-encoding prolog prolog Run First Rest Encoded Last Prev Run length encoding using prolog I am starting to learn Prolog by solving different example. I am doing run length encoding on text data using Prolog, which should produce a character fol...
[ 0.0198974609375, 0.00127410888671875, 0.008056640625, 0.034912109375, -0.01556396484375, 0.014892578125, -0.007720947265625, 0.01202392578125, -0.006927490234375, -0.037109375, 0.0091552734375, 0.0250244140625, 0.004364013671875, 0.0196533203125, -0.0035552978515625, 0.00616455078125, ...
[ 28398, 140909, 22, 587, 6238, 17368, 502, 4867, 11675, 23986, 927, 66332, 23972, 49756, 357, 40899, 21672, 74717, 30698, 1250, 3115, 27781, 7986, 2053, 5608, 27489, 62816, 134629, 14012, 20028, 74918, 40, 944, 3444, 35166, 9384, 35064, 5700, ...
[ 0.202392578125, 0.2359619140625, 0.1019287109375, 0.191650390625, 0.09869384765625, 0.1142578125, 0.1673583984375, 0.227294921875, 0.18017578125, 0.1427001953125, 0.024078369140625, 0.1868896484375, 0.1063232421875, 0.186767578125, 0.093994140625, 0.2200927734375, 0.10369873046875, ...
embed
6193970_c0
6193970
prolog
0
Title: Prolog problem! &#x27;singles&#x27; ! Problem title: Prolog problem! &#x27;singles&#x27; ! Tags: prolog Problem: Prolog problem! 'singles' ! I have a prolog homework, which should work like this: singles([1,2,3,2,2,4,1], [3,4]). true Now I've figured out I should test if one element is single in the list then pu...
Prolog problem! &#x27;singles&#x27; ! Prolog problem! &#x27;singles&#x27; ! prolog Prolog Prolog problem! 'singles' ! I have a prolog homework, which should work like this: Now I've figured out I should test if one element is single in the list then put all the single element together..then I wrote down: in the isSingl...
[ 0.0091552734375, 0.0035400390625, 0.007781982421875, -0.0024566650390625, -0.045654296875, 0.0194091796875, -0.007080078125, -0.006591796875, 0.01007080078125, -0.020263671875, 0.00897216796875, -0.027587890625, -0.0198974609375, -0.00738525390625, -0.006378173828125, 0.012451171875, ...
[ 1250, 4867, 2967, 38, 3768, 6953, 1577, 711, 502, 5368, 18244, 4488, 26366, 3034, 2174, 1632, 12830, 83, 11001, 5303, 3884, 756, 25842, 54397, 7565, 213039, 32354, 1193, 5608, 186, 23, 32036, 339, 1284, 959, 3525, 418, 15490, 106, 96386, ...
[ 0.2008056640625, 0.285400390625, 0.2047119140625, 0.0426025390625, 0.06640625, 0.2286376953125, 0.2076416015625, 0.02557373046875, 0.14013671875, 0.0482177734375, 0.1339111328125, 0.089111328125, 0.03070068359375, 0.195068359375, 0.0771484375, 0.0633544921875, 0.1793212890625, 0.16...
embed
41166685_c1
41166685
prolog
1
generalize this to an arbitrary number of lists and domain, but this is the smallest equivalent problem I could think of. Here's my (failed) attempt so far: :- use_module(library(clpfd)). constseq([], _, 0). constseq([L|_], A, 0) :- L #\= A. constseq([A|Ls], A, N) :- N1 #= N - 1, constseq(Ls, A, N1). main(L1, L2) :- l...
generalize this to an arbitrary number of lists and domain, but this is the smallest equivalent problem I could think of. Here's my (failed) attempt so far: :- use_module(library(clpfd)). constseq([], _, 0). constseq([L|_], A, 0) :- L #\= A. constseq([A|Ls], A, N) :- N1 #= N - 1, constseq(Ls, A, N1). main(L1, L2) :- l...
[ 0.003173828125, 0.0126953125, 0.00022411346435546875, 0.01141357421875, 0.00518798828125, 0.0125732421875, 0.00836181640625, 0.00897216796875, 0.01123046875, -0.043212890625, -0.01104736328125, 0.010986328125, -0.002349853515625, 0.03515625, -0.00677490234375, -0.00174713134765625, 0...
[ 4537, 20650, 903, 47, 61799, 14012, 5303, 7, 77758, 19336, 525, 183234, 2967, 5351, 120540, 297, 81887, 2060, 4527, 83279, 13, 150, 2844, 1294, 34937, 39557, 71, 158, 271, 184, 864, 757, 866, 339, 62, 418, 5201, 10461, 140909, 35914, 30...
[ 0.142333984375, 0.0633544921875, 0.0697021484375, 0.0222930908203125, 0.080322265625, 0.03656005859375, 0.225830078125, 0.0582275390625, 0.152587890625, 0.04815673828125, 0.0556640625, 0.0806884765625, 0.1746826171875, 0.03143310546875, 0.1156005859375, 0.016937255859375, 0.100952148...
embed