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
69509611_c0
69509611
prolog
0
Title: Recursive prolog: Compare the elements of the first two lists less than or equal to the third list Problem title: Recursive prolog: Compare the elements of the first two lists less than or equal to the third list Tags: prolog Problem: Recursive prolog: Compare the elements of the first two lists less than or equ...
Recursive prolog: Compare the elements of the first two lists less than or equal to the third list Recursive prolog: Compare the elements of the first two lists less than or equal to the third list prolog Recursive Compare Recursive prolog: Compare the elements of the first two lists less than or equal to the third lis...
[ 0.006011962890625, 0.009765625, -0.00665283203125, 0.03271484375, -0.0033721923828125, 0.0150146484375, -0.0123291015625, 0.00136566162109375, 0.0272216796875, 0.0220947265625, -0.00168609619140625, 0.00183868408203125, 0.000141143798828125, 0.014404296875, 0.016845703125, -0.017578125...
[ 853, 48650, 5844, 502, 4867, 12, 113307, 13, 80854, 5117, 6626, 5303, 40715, 3501, 105950, 50960, 5608, 54, 195625, 1528, 4263, 3622, 14012, 32036, 418, 136, 304, 140992, 29568 ]
[ 0.110107421875, 0.2315673828125, 0.204345703125, 0.201171875, 0.288818359375, 0.035919189453125, 0.238037109375, 0.07928466796875, 0.19775390625, 0.0816650390625, 0.111328125, 0.20166015625, 0.193603515625, 0.057159423828125, 0.1053466796875, 0.2083740234375, 0.05389404296875, 0.04...
embed
29311147_c0
29311147
prolog
0
Title: How to sort different outputs in prolog according to their lengths? Problem title: How to sort different outputs in prolog according to their lengths? Tags: predicate, list, prolog, size Problem: How to sort different outputs in prolog according to their lengths? How can I sort/display all different outputs that...
How to sort different outputs in prolog according to their lengths? How to sort different outputs in prolog according to their lengths? predicate list prolog size How How to sort different outputs in prolog according to their lengths? How can I sort/display all different outputs that make a predicate true according to ...
[ 0.01055908203125, 0.0107421875, 0.0146484375, 0.000850677490234375, -0.0224609375, 0.0003604888916015625, 0.004974365234375, -0.006988525390625, 0.00872802734375, -0.00170135498046875, 0.003326416015625, -0.00069427490234375, -0.005889892578125, -0.0128173828125, 0.0067138671875, -0.00...
[ 11249, 47, 12096, 12921, 140992, 502, 4867, 59499, 140909, 1653, 2063, 67, 5303, 13267, 7, 23, 2363, 3827, 20706, 756, 29568, 8108, 1884 ]
[ 0.0775146484375, 0.08807373046875, 0.222900390625, 0.1397705078125, 0.230712890625, 0.1595458984375, 0.225830078125, 0.115234375, 0.1357421875, 0.1448974609375, 0.1778564453125, 0.041900634765625, 0.123779296875, 0.129150390625, 0.012939453125, 0.0107421875, 0.038330078125, 0.01098...
embed
47779556_c0
47779556
prolog
0
Title: Prolog; find list item Problem title: Prolog; find list item Tags: prolog, list Problem: Prolog; find list item I have a list of pairs and want to find the element with the corresponding first value. ?- findconn1(9, [(9,[23,33]),(42,[21,322])], R). So in this case I want the result to be (9,[23,23]) in R . The c...
Prolog; find list item Prolog; find list item prolog list Prolog findconn1 Prolog; find list item I have a list of pairs and want to find the element with the corresponding first value. So in this case I want the result to be (9,[23,23]) in R . The code is It always returns false despite that the element is present. An...
[ 0.00159454345703125, 0.001983642578125, 0.01544189453125, -0.000820159912109375, -0.01104736328125, 0.0050048828125, -0.01092529296875, 0.002044677734375, 0.010009765625, -0.05078125, 0.033935546875, -0.0147705078125, -0.012939453125, -0.0096435546875, 0.0047607421875, 0.00125885009765...
[ 1250, 4867, 7413, 5303, 35735, 502, 2271, 19, 418, 80836, 3444, 12830, 678, 42518, 5117, 34292, 16750, 186, 23817, 3742, 23, 627, 18151, 1650, 11343, 30646, 98320, 61518, 450, 13379 ]
[ 0.185546875, 0.262451171875, 0.1417236328125, 0.1917724609375, 0.1949462890625, 0.13916015625, 0.1063232421875, 0.048492431640625, 0.037384033203125, 0.2105712890625, 0.1119384765625, 0.1915283203125, 0.0290069580078125, 0.1112060546875, 0.146484375, 0.17138671875, 0.1595458984375, ...
embed
61079223_c0
61079223
prolog
0
Title: Prolog - deleting pairs with the same first value from list Problem title: Prolog - deleting pairs with the same first value from list Tags: list, prolog Problem: Prolog - deleting pairs with the same first value from list i have list of objects like this list([obj(x,y),obj(x,z),obj(a,b),obj(b,c)]). and i would ...
Prolog - deleting pairs with the same first value from list Prolog - deleting pairs with the same first value from list list prolog list Prolog Prolog - deleting pairs with the same first value from list i have list of objects like this and i would like to remove those elements that share the same first value, so i can...
[ 0.0007476806640625, 0.01611328125, 0.004302978515625, -0.000701904296875, -0.00909423828125, 0.00186920166015625, -0.0162353515625, 0.0096435546875, 0.000804901123046875, -0.02392578125, 0.006072998046875, 0.00775146484375, 0.013427734375, -0.0189208984375, -0.00787353515625, 0.0144653...
[ 1250, 4867, 24674, 1916, 80836, 7, 678, 5701, 5117, 34292, 1295, 5303, 502, 765, 111, 36746, 1884, 903, 2806, 47, 87388, 80854, 12008, 4488, 73197, 2704, 6713, 4358, 22936, 6183, 237875 ]
[ 0.177490234375, 0.2376708984375, 0.1959228515625, 0.085205078125, 0.227294921875, 0.0693359375, 0.059722900390625, 0.13623046875, 0.1251220703125, 0.1680908203125, 0.111572265625, 0.1846923828125, 0.1270751953125, 0.0142364501953125, 0.004638671875, 0.164306640625, 0.08349609375, 0...
embed
10317228_c0
10317228
prolog
0
Title: SWI-Prolog Finding Value Of X Problem title: SWI-Prolog Finding Value Of X Tags: predicate, prolog Problem: SWI-Prolog Finding Value Of X I have something like this in the database. flight( tk1, ist, esb, 40 ). flight( tk2, ist, mlx, 90 ). And I have written a predicate called test. test([S], L1):- findall( C, (...
SWI-Prolog Finding Value Of X SWI-Prolog Finding Value Of X predicate prolog SWI-Prolog Finding Value tk1 tk2 SWI-Prolog Finding Value Of X I have something like this in the database. And I have written a predicate called test. The output when I write test([ist], X). is X = [esb, mlx]. So this is true but when I write ...
[ 0.013916015625, 0.01031494140625, 0.00970458984375, 0.00408935546875, -0.0205078125, 0.01312255859375, 0.0167236328125, 0.004608154296875, 0.014892578125, -0.0128173828125, 0.015869140625, 0.00176239013671875, -0.0194091796875, -0.0208740234375, 0.00457763671875, -0.00848388671875, 0...
[ 159, 38969, 10752, 4867, 26040, 190060, 6619, 1193, 1653, 2063, 502, 31472, 418, 304, 63399, 59121, 67, 35839, 3034, 140992, 33022, 1419, 2203, 90, 275, 7115, 425, 29568, 1284, 3229, 1542, 83, 98320, 44084 ]
[ 0.05389404296875, 0.2208251953125, 0.1241455078125, 0.163818359375, 0.08154296875, 0.2132568359375, 0.116943359375, 0.18017578125, 0.173095703125, 0.1864013671875, 0.08544921875, 0.1109619140625, 0.00006103515625, 0.017242431640625, 0.1529541015625, 0.1175537109375, 0.0858154296875, ...
embed
42986832_c1
42986832
prolog
1
([],[]). valid_seq(L,[0|T]):-valid_seq(L,T). valid_seq([H|L],[1|T]):-test_cst(H,[1|T],S),valid_seq(L,S). b_w([]). b_w([H|L]) :- H is 0, b_w(L);H is 1, b_w(L). valid_lines([],[]). valid_lines([H|L],[X|Y]) :- b_w(X), valid_seq(H,X), valid_lines(L,Y). extract(_,[],[]). extract(K,[X|Y],[H|L]) :- nth1(K,X,H), extract(K,Y,L)...
([],[]). valid_seq(L,[0|T]):-valid_seq(L,T). valid_seq([H|L],[1|T]):-test_cst(H,[1|T],S),valid_seq(L,S). b_w([]). b_w([H|L]) :- H is 0, b_w(L);H is 1, b_w(L). valid_lines([],[]). valid_lines([H|L],[X|Y]) :- b_w(X), valid_seq(H,X), valid_lines(L,Y). extract(_,[],[]). extract(K,[X|Y],[H|L]) :- nth1(K,X,H), extract(K,Y,L)...
[ -0.00567626953125, -0.002838134765625, 0.0211181640625, 0.018310546875, 0.003326416015625, -0.003265380859375, -0.025390625, 0.002593994140625, 0.0133056640625, -0.0020599365234375, -0.0108642578125, 0.00171661376953125, -0.004425048828125, 0.033203125, -0.02783203125, 0.00311279296875...
[ 1065, 194, 35604, 454, 184, 864, 132, 866, 2389, 58745, 618, 2077, 9, 7013, 71, 841, 418, 6954, 271, 294, 876, 434, 15772, 572, 83, 757, 3142, 106, 59801, 1542, 1723, 125663, 605, 653, 927, 8447, 316, 1779, 341, 21748, 17727, 1456, ...
[ 0.0189056396484375, 0.03466796875, 0.2841796875, 0.05126953125, 0.13037109375, 0.1971435546875, 0.002288818359375, 0.1402587890625, 0.10443115234375, 0.09820556640625, 0.08856201171875, 0.0308837890625, 0.00274658203125, 0.175048828125, 0.1390380859375, 0.114013671875, 0.103393554687...
embed
16629402_c0
16629402
prolog
0
Title: Prolog List instantiation Problem title: Prolog List instantiation Tags: prolog, list Problem: Prolog List instantiation i want to create a predifined list. But i am doing something wrong because when i pass it as an argument it doesnt work. Here is the code i have: list([5, 1, 2, 8, 10, 4, 3, 6, 9, 7]). print( ...
Prolog List instantiation Prolog List instantiation prolog list Prolog List Prolog List instantiation i want to create a predifined list. But i am doing something wrong because when i pass it as an argument it doesnt work. Here is the code i have: Console output: It doesnt work. But here is when i pass the list myself:
[ 0.030029296875, 0.013671875, 0.018310546875, 0.00921630859375, -0.003692626953125, 0.00653076171875, -0.01239013671875, -0.003631591796875, 0.01116943359375, -0.01116943359375, 0.0081787109375, -0.01507568359375, -0.0184326171875, 0.005615234375, 0.0012664794921875, 0.0191650390625, ...
[ 1250, 4867, 32036, 34648, 14, 2320, 502, 5303, 3444, 28282, 10, 1653, 27430, 14534, 20594, 44691, 27875, 442, 237, 142, 10750, 22027, 18, 4488, 18151, 1657, 40777, 140992, 1650, 70, 35978 ]
[ 0.158447265625, 0.218017578125, 0.204345703125, 0.0953369140625, 0.078125, 0.0121917724609375, 0.11346435546875, 0.235107421875, 0.076171875, 0.1580810546875, 0.0075531005859375, 0.136474609375, 0.1708984375, 0.0882568359375, 0.0250701904296875, 0.09515380859375, 0.17578125, 0.0156...
embed
67050801_c0
67050801
prolog
0
Title: Prolog - Reading through a list Problem title: Prolog - Reading through a list Tags: list, prolog Problem: Prolog - Reading through a list For a problem in my class, I'm having trouble figuring out how to read through a list of numbers in Prolog. The idea is that a predicate called contains_big would read throug...
Prolog - Reading through a list Prolog - Reading through a list list prolog Prolog Reading contains_big Prolog - Reading through a list For a problem in my class, I'm having trouble figuring out how to read through a list of numbers in Prolog. The idea is that a predicate called contains_big would read through a list o...
[ 0.00921630859375, -0.0025787353515625, 0.0034637451171875, 0.0024566650390625, -0.0034027099609375, 0.00921630859375, 0.00185394287109375, -0.015625, 0.005950927734375, -0.025390625, 0.00151824951171875, -0.014404296875, -0.0247802734375, -0.02099609375, 0.0146484375, -0.00076293945312...
[ 1250, 4867, 104951, 8305, 5303, 10, 502, 70541, 7, 32976, 2967, 18507, 63134, 26747, 3642, 12301, 101935, 23, 6528, 1653, 2063, 67, 35839, 454, 2806, 34475, 35644, 9774, 2174, 14012, 645, 805, 98320, 959, 903, 163846 ]
[ 0.189453125, 0.2403564453125, 0.205322265625, 0.21142578125, 0.22021484375, 0.0087890625, 0.1424560546875, 0.2298583984375, 0.0869140625, 0.18212890625, 0.0712890625, 0.115234375, 0.065185546875, 0.06317138671875, 0.0293121337890625, 0.2005615234375, 0.155029296875, 0.0228576660156...
embed
27889426_c1
27889426
prolog
1
another issue, this time to do with working out and displaying the sum of the income for each member. I have modified my rules, in order to display this, as follows: getincome(Name, I) :- staff(Name, _, _ ), findall(Income,staff(Name,_,Income),Member), sum(Member, I). Whenever I enter the query: ?- getincome(X, Y). I ...
another issue, this time to do with working out and displaying the sum of the income for each member. I have modified my rules, in order to display this, as follows: getincome(Name, I) :- staff(Name, _, _ ), findall(Income,staff(Name,_,Income),Member), sum(Member, I). Whenever I enter the query: ?- getincome(X, Y). I ...
[ -0.00051116943359375, -0.00860595703125, 0.024658203125, 0.013671875, -0.031005859375, -0.0048828125, 0.004302978515625, 0.017822265625, 0.01214599609375, -0.03759765625, 0.01422119140625, 0.00165557861328125, -0.01153564453125, -0.009033203125, 0.01275634765625, 0.01129150390625, 0....
[ 15700, 31089, 903, 1733, 20697, 1810, 44116, 10554, 91763, 12638, 32786, 73197, 297, 91736, 2046, 73, 45738, 163612, 87, 23082, 7413, 5584, 4153, 590, 4902, 594, 27417, 30441, 30957, 70, 41, 1294, 705, 1542, 990, 13695, 20949, 171763, 67, ...
[ 0.08642578125, 0.1641845703125, 0.031005859375, 0.044769287109375, 0.127197265625, 0.1915283203125, 0.1595458984375, 0.1708984375, 0.2301025390625, 0.08282470703125, 0.211669921875, 0.1328125, 0.00543212890625, 0.1578369140625, 0.1009521484375, 0.141845703125, 0.2254638671875, 0.11...
embed
33863649_c0
33863649
prolog
0
Title: Create a list in prolog Problem title: Create a list in prolog Tags: prolog Problem: Create a list in prolog How would I implement shoppinglist, based on the Holiday passed in, it should return a list for all ingredients in all sides for that holiday. For example, shoppinglist(halloween, X) should return sugar, ...
Create a list in prolog Create a list in prolog prolog Create Facts Rules Holiday List Create a list in prolog How would I implement shoppinglist, based on the Holiday passed in, it should return a list for all ingredients in all sides for that holiday. For example, shoppinglist(halloween, X) should return sugar, water...
[ 0.00885009765625, -0.00860595703125, 0.0203857421875, 0.00927734375, -0.00445556640625, 0.0177001953125, -0.01031494140625, 0.0213623046875, 0.0003376007080078125, -0.01513671875, 0.0034332275390625, -0.022216796875, -0.01312255859375, 0.0120849609375, 0.0003070831298828125, 0.02075195...
[ 151313, 10, 5303, 23, 502, 4867, 132640, 139118, 62827, 32036, 2806, 29479, 33652, 6562, 35509, 70, 115081, 5608, 30646, 100, 756, 145170, 5609, 65006, 27781, 29907, 2600, 33, 1193, 101087, 7401, 5 ]
[ 0.1295166015625, 0.0267181396484375, 0.2396240234375, 0.08868408203125, 0.149658203125, 0.23193359375, 0.148681640625, 0.16357421875, 0.228515625, 0.2188720703125, 0.05780029296875, 0.1881103515625, 0.179931640625, 0.24169921875, 0.0784912109375, 0.01465606689453125, 0.137451171875, ...
embed
21759010_c0
21759010
prolog
0
Title: Prolog "Out of local stack" Error Problem title: Prolog "Out of local stack" Error Tags: prolog, transitive-closure, failure-slice Problem: Prolog "Out of local stack" Error Here is my simple Prolog program: friend(X,Y):- knows(X,Y). friend(X,Z):- friend(X,Y), friend(Y,Z). knows(brian,tom). k...
Prolog "Out of local stack" Error Prolog "Out of local stack" Error prolog transitive-closure failure-slice Prolog Out Error Prolog "Out of local stack" Error Here is my simple Prolog program: If I type the following query Prolog will give the following output: If a further type a semicolon, Prolog ...
[ 0.03857421875, 0.0034332275390625, -0.01214599609375, 0.035888671875, -0.0024566650390625, -0.0084228515625, -0.026611328125, 0.01544189453125, 0.006134033203125, -0.05126953125, 0.0169677734375, -0.0179443359375, 0.0101318359375, 0.0089111328125, 0.05419921875, 0.006195068359375, 0....
[ 1250, 4867, 79858, 111, 4000, 177261, 212059, 502, 62621, 5844, 170224, 137578, 13348, 13538, 8781, 1528, 10644, 25632, 41, 1294, 140992, 53333, 40, 46029, 4759, 5154, 444, 87, 20594, 44691, 3688 ]
[ 0.163818359375, 0.290283203125, 0.19189453125, 0.20068359375, 0.18505859375, 0.2222900390625, 0.14990234375, 0.1163330078125, 0.125244140625, 0.0904541015625, 0.177978515625, 0.1556396484375, 0.134033203125, 0.1624755859375, 0.058319091796875, 0.08935546875, 0.141845703125, 0.04876...
embed
77061142_c1
77061142
prolog
1
tried nth0/3 and nth1/3 but they only described two characters in sequence as in: ?- T = "Prolog is marquee ready! ", nth1(I,T,A),nth0(I,T,B). T = "Prolog is marquee ready! ", I = 1, A = 'P', B = r ; T = "Prolog is marquee ready! ", I = 2, A = r, B = o ; ... . Edit: one clarification about the repetitions. They should...
tried nth0/3 and nth1/3 but they only described two characters in sequence as in: ?- T = "Prolog is marquee ready! ", nth1(I,T,A),nth0(I,T,B). T = "Prolog is marquee ready! ", I = 1, A = 'P', B = r ; T = "Prolog is marquee ready! ", I = 2, A = r, B = o ; ... . Edit: one clarification about the repetitions. They should...
[ 0.01025390625, -0.004180908203125, -0.00238037109375, 0.0308837890625, 0.004058837890625, -0.005218505859375, 0.0196533203125, 0.00299072265625, 0.0224609375, -0.00439453125, 0.005279541015625, -0.01312255859375, 0.001922607421875, 0.0201416015625, -0.000949859619140625, -0.00680541992...
[ 37842, 653, 927, 2389, 18113, 136, 131530, 4734, 151552, 6626, 124850, 23, 40, 944, 3956, 705, 384, 2203, 10752, 4867, 83, 53053, 13, 43542, 38, 418, 568, 618, 284, 571, 87, 106, 62, 683, 335, 1690, 116, 36, 17306, 57346, 5256, 10660,...
[ 0.1326904296875, 0.0977783203125, 0.1956787109375, 0.1484375, 0.261962890625, 0.0025634765625, 0.254150390625, 0.1112060546875, 0.1910400390625, 0.145263671875, 0.23193359375, 0.062744140625, 0.075927734375, 0.1573486328125, 0.09912109375, 0.05902099609375, 0.099609375, 0.029083251...
embed
77510098_c0
77510098
prolog
0
Title: SUM list members in PROLOG Problem title: SUM list members in PROLOG Tags: prolog Problem: SUM list members in PROLOG I'm new to prolog and trying to do a sum of a list, for example: a(1,2,3). a(2,3,4). a(4,5,6). a(7,8,9). rule1(SUM) :- findall([X,Y,Z], a(X,Y,Z), LIST), sum(LIST,SUM). I tried with sum(LIST,SUM) ...
SUM list members in PROLOG SUM list members in PROLOG prolog SUM PROLOG rule1 LIST SUM list members in PROLOG I'm new to prolog and trying to do a sum of a list, for example: I tried with sum(LIST,SUM) and will return an undefined error regarding the sum predicate. I want to create the LIST that will look like [[1, 2, ...
[ 0.007171630859375, 0.01171875, -0.004364013671875, 0.0291748046875, -0.039306640625, 0.01171875, -0.00191497802734375, 0.034912109375, 0.0286865234375, -0.0291748046875, 0.00168609619140625, -0.0181884765625, 0.00238037109375, -0.004669189453125, 0.0172119140625, 0.004150390625, 0.01...
[ 127944, 5303, 43032, 23, 10514, 47510, 502, 4867, 79986, 418, 195977, 3525, 31577, 10554, 111, 37842, 30646, 9232, 5983, 18499, 1653, 2063, 67, 3444, 28282, 70, 6, 6713, 1884, 116, 138, 201, 190, 305, 382, 483, 15190, 11907, 11001, 14012,...
[ 0.269775390625, 0.236083984375, 0.2232666015625, 0.0293731689453125, 0.162841796875, 0.235107421875, 0.1229248046875, 0.191162109375, 0.1468505859375, 0.0623779296875, 0.1943359375, 0.06085205078125, 0.048492431640625, 0.22412109375, 0.0621337890625, 0.05755615234375, 0.0296325683593...
embed
23185658_c0
23185658
prolog
0
Title: How to make list out of objects in Prolog? Problem title: How to make list out of objects in Prolog? Tags: prolog, list Problem: How to make list out of objects in Prolog? I can add a single object to a list with this code and query: makelist(A, B, C, X) :- append([1, 2, 3],A, X). ?- makelist(a, b, c, X). X = [1...
How to make list out of objects in Prolog? How to make list out of objects in Prolog? prolog list How Prolog How to make list out of objects in Prolog? I can add a single object to a list with this code and query: However rather than the usual separator comma (,) there's a vertical line separator (|) and I cannot add a...
[ 0.021484375, 0.01202392578125, 0.0201416015625, 0.01116943359375, -0.0023193359375, 0.01397705078125, -0.0289306640625, 0.0242919921875, 0.01043701171875, -0.006988525390625, -0.00970458984375, -0.0390625, 0.00927734375, 0.0030517578125, 0.006103515625, -0.024658203125, 0.01477050781...
[ 11249, 3249, 5303, 1810, 111, 36746, 7, 23, 1250, 4867, 502, 15190, 11001, 47, 18151, 41, 1294, 38310, 748, 96117, 79259, 13315, 58745, 53418, 15700, 5701 ]
[ 0.04937744140625, 0.080322265625, 0.233154296875, 0.1602783203125, 0.134521484375, 0.234130859375, 0.07684326171875, 0.0557861328125, 0.162841796875, 0.260009765625, 0.1199951171875, 0.1077880859375, 0.1007080078125, 0.0699462890625, 0.09588623046875, 0.046905517578125, 0.04196166992...
embed
27836779_c1
27836779
prolog
1
: check_yn = verify_yesno(post_script_link_list) if check_yn == 1: result = 'Yes/No' break elif check_yn == 0: result = 'Not found' break break else: result = 'Not found' is it possible to perform usnig prolog? I am using pyswip and python UPDATE 1 ?- split_string("a.b.c.d", ".", "", L). ERROR: toplevel: Undefined proc...
: check_yn = verify_yesno(post_script_link_list) if check_yn == 1: result = 'Yes/No' break elif check_yn == 0: result = 'Not found' break break else: result = 'Not found' is it possible to perform usnig prolog? I am using pyswip and python UPDATE 1 ?- split_string("a.b.c.d", ".", "", L). ERROR: toplevel: Undefined proc...
[ 0.009033203125, 0.0159912109375, -0.0013885498046875, 0.0301513671875, -0.042724609375, 0.006256103515625, 0.015869140625, 0.008056640625, -0.00194549560546875, -0.0140380859375, -0.004486083984375, -0.005767822265625, -0.0242919921875, -0.02734375, 0.005584716796875, -0.00872802734375...
[ 12765, 3371, 493, 40383, 63736, 157, 4594, 32032, 10187, 6562, 13806, 16750, 91480, 64, 5021, 36356, 88, 757, 122116, 14037, 83, 442, 7722, 51339, 1821, 21882, 502, 4867, 17368, 57756, 2452, 254, 136, 17198, 50828, 161521, 106, 65450, 91693...
[ 0.218994140625, 0.203369140625, 0.1529541015625, 0.1787109375, 0.128173828125, 0.1854248046875, 0.0968017578125, 0.150634765625, 0.158935546875, 0.177978515625, 0.07391357421875, 0.121826171875, 0.14208984375, 0.030548095703125, 0.1431884765625, 0.15576171875, 0.025146484375, 0.090...
embed
1384949_c0
1384949
prolog
0
Title: Counting Sublist Elements in Prolog Problem title: Counting Sublist Elements in Prolog Tags: prolog Problem: Counting Sublist Elements in Prolog How can I count nested list elements in Prolog? I have the following predicates defined, which will count a nested list as one element: length([ ], 0). length([H|T],N) ...
Counting Sublist Elements in Prolog Counting Sublist Elements in Prolog prolog Counting Sublist Elements Prolog Out Output Counting Sublist Elements in Prolog How can I count nested list elements in Prolog? I have the following predicates defined, which will count a nested list as one element: Usage: This works, but I ...
[ 0.01019287109375, 0.016357421875, 0.0035247802734375, 0.001983642578125, 0.005615234375, 0.0213623046875, -0.009033203125, 0.01007080078125, 0.0162353515625, -0.0361328125, -0.004638671875, -0.028564453125, 0.011962890625, 0.029541015625, 0.0155029296875, -0.01507568359375, 0.0344238...
[ 1311, 128396, 8273, 6562, 48325, 1250, 4867, 502, 13538, 831, 54529, 8512, 71, 5303, 80854, 23, 1653, 2063, 1636, 61924, 237, 1632, 12830, 70166, 43240, 1884, 7077, 305 ]
[ 0.1361083984375, 0.1512451171875, 0.2164306640625, 0.244873046875, 0.178466796875, 0.1650390625, 0.2293701171875, 0.1055908203125, 0.126708984375, 0.00885009765625, 0.2095947265625, 0.2261962890625, 0.10498046875, 0.198974609375, 0.1839599609375, 0.035675048828125, 0.0849609375, 0....
embed
67171083_c0
67171083
prolog
0
Title: Remove Duplicates while retaining order, Prolog Problem title: Remove Duplicates while retaining order, Prolog Tags: prolog Problem: Remove Duplicates while retaining order, Prolog removeDup([],[]). removeDup([H|T],T1) :- member(H,T), removeDup(T,T1). removeDup([H|T],T1) :- not(member(H,T)), removeDup(T,Q), appe...
Remove Duplicates while retaining order, Prolog Remove Duplicates while retaining order, Prolog prolog Remove Duplicates Prolog Remove Duplicates while retaining order, Prolog This removes the duplicates but changes the order. For append I'm expecting H to be added to the end of T1, then set as Q. How can i retain the ...
[ 0.01055908203125, 0.031982421875, 0.018310546875, -0.020751953125, -0.0020751953125, -0.01141357421875, -0.000392913818359375, 0.007537841796875, 0.00787353515625, -0.02392578125, 0.000278472900390625, 0.00732421875, -0.0003147125244140625, 0.003692626953125, -0.005859375, 0.0201416015...
[ 181139, 786, 52721, 1636, 12960, 112033, 14653, 12989, 1250, 4867, 502, 3293, 87388, 171763, 1284, 65572, 114689, 71, 41206, 572, 49814, 3564, 384, 418, 5423, 237, 2396, 73, 35548, 224833 ]
[ 0.1556396484375, 0.16015625, 0.2259521484375, 0.1380615234375, 0.08966064453125, 0.1358642578125, 0.044158935546875, 0.196533203125, 0.1568603515625, 0.211669921875, 0.09124755859375, 0.00335693359375, 0.121337890625, 0.20654296875, 0.040679931640625, 0.1219482421875, 0.13916015625, ...
embed
39682265_c0
39682265
prolog
0
Title: SWI-Prolog Installation on RHEL 7 Problem title: SWI-Prolog Installation on RHEL 7 Tags: prolog, redhat, rhel, swi-prolog Problem: SWI-Prolog Installation on RHEL 7 I am attempting to install SWI-Prolog on a server running rhel 7. I have followed the instructions to build SWI-Prolog here: http://www.swi-prolog.o...
SWI-Prolog Installation on RHEL 7 SWI-Prolog Installation on RHEL 7 prolog redhat rhel swi-prolog SWI-Prolog Installation RHEL SWI-Prolog Installation on RHEL 7 I am attempting to install SWI-Prolog on a server running rhel 7. I have followed the instructions to build SWI-Prolog here: http://www.swi-prolog.org/build/Re...
[ 0.004058837890625, -0.00341796875, 0.00167083740234375, 0.0159912109375, -0.041015625, 0.0167236328125, 0.000016689300537109375, -0.01470947265625, -0.0059814453125, 0.02783203125, 0.0189208984375, -0.01031494140625, -0.0198974609375, -0.01324462890625, -0.01416015625, 0.00076675415039...
[ 159, 38969, 9, 10752, 4867, 145323, 98, 627, 154985, 361, 502, 4842, 2943, 60971, 141, 91, 2452, 3454, 81887, 20600, 10723, 51042, 2861, 134629, 167934, 45367, 3688, 7, 177149, 80852, 7693, 28484, 15490, 18499, 87, 1957, 110, 144851, 38415,...
[ 0.1102294921875, 0.26806640625, 0.07232666015625, 0.1717529296875, 0.23828125, 0.1597900390625, 0.0755615234375, 0.0638427734375, 0.19921875, 0.1651611328125, 0.11181640625, 0.08892822265625, 0.1402587890625, 0.0919189453125, 0.103515625, 0.03887939453125, 0.2239990234375, 0.122924...
embed
15639686_c0
15639686
prolog
0
Title: Prolog substitution Problem title: Prolog substitution Tags: replace, substitution, prolog Problem: Prolog substitution How can I replace a list with another list that contain the variable to be replaced. for example rep([x, d, e, z, x, z, p], [x=z, z=x, d=c], R). R = [z, c, e, x, z, x, p] the x to z and z doesn...
Prolog substitution Prolog substitution replace substitution prolog Prolog Prolog substitution How can I replace a list with another list that contain the variable to be replaced. for example the x to z and z doesn't change after it has been replaced. so far I did only the one without the list
[ -0.002166748046875, 0.01513671875, 0.013916015625, 0.01300048828125, -0.0107421875, 0.00191497802734375, -0.0272216796875, 0.025634765625, 0.002288818359375, 0.0086669921875, -0.004852294921875, 0.003997802734375, -0.00396728515625, 0.00179290771484375, 0.0023956298828125, 0.0000388622...
[ 1250, 4867, 161740, 1830, 91995, 502, 11249, 831, 87, 5303, 678, 15700, 70541, 77336, 47, 71, 1022, 97, 136, 22027, 18, 15549, 7103, 1556, 2060, 6777, 15490 ]
[ 0.139404296875, 0.2213134765625, 0.1861572265625, 0.068115234375, 0.2047119140625, 0.0953369140625, 0.044342041015625, 0.05853271484375, 0.04461669921875, 0.19775390625, 0.075439453125, 0.05352783203125, 0.09149169921875, 0.229736328125, 0.10791015625, 0.04119873046875, 0.04238891601...
embed
10399774_c0
10399774
prolog
0
Title: Prolog recursion grammar Problem title: Prolog recursion grammar Tags: prolog, dcg Problem: Prolog recursion grammar at the moment I am having a problem with looping back to noun_phrase from np2 . I was wondering if someone can help me loop back to noun_phrase . Here is some code: noun_phrase([X|T],(det(X), NP2)...
Prolog recursion grammar Prolog recursion grammar prolog dcg Prolog noun_phrase np2 Rem Rest Prolog recursion grammar at the moment I am having a problem with looping back to noun_phrase from np2 . I was wondering if someone can help me loop back to noun_phrase . Here is some code: I want to loop from np2 back to noun_...
[ 0.00116729736328125, 0.0115966796875, 0.003570556640625, 0.0296630859375, 0.0035400390625, 0.03515625, 0.0113525390625, 0.000217437744140625, 0.01275634765625, -0.0400390625, 0.01708984375, -0.0145263671875, -0.016357421875, 0.006378173828125, 0.02880859375, 0.010009765625, -0.011535...
[ 1250, 4867, 195625, 1830, 122092, 147, 502, 177, 110, 309, 179665, 25037, 304, 38645, 49756, 3095, 2967, 40956, 214, 4420, 47, 184, 1295, 149016, 4358, 18151, 3444, 44691, 256, 76622, 25842 ]
[ 0.1519775390625, 0.26171875, 0.1890869140625, 0.0701904296875, 0.1339111328125, 0.0899658203125, 0.09771728515625, 0.018524169921875, 0.095947265625, 0.1343994140625, 0.2027587890625, 0.1519775390625, 0.1715087890625, 0.15380859375, 0.1845703125, 0.044586181640625, 0.0792236328125, ...
embed
32764537_c0
32764537
prolog
0
Title: Another rule as argument to a rule in prolog Problem title: Another rule as argument to a rule in prolog Tags: prolog Problem: Another rule as argument to a rule in prolog This is my prolog file. male(bob). male(john). female(betty). female(dana). father(bob, john). father(bob, dana). mother(betty, john). mother...
Another rule as argument to a rule in prolog Another rule as argument to a rule in prolog prolog Another Another rule as argument to a rule in prolog This is my prolog file. I want to query something like this daughter(X, mother(Y, john)). Is it possible? I'm trying to get daughter of john's mother. I got this idea fro...
[ 0.0194091796875, 0.01025390625, -0.006927490234375, -0.0005340576171875, 0.00982666015625, 0.01177978515625, -0.01031494140625, 0.0185546875, 0.00897216796875, -0.057861328125, -0.006439208984375, -0.016357421875, -0.0162353515625, 0.0166015625, 0.018798828125, -0.00152587890625, 0.0...
[ 116267, 79986, 237, 10750, 47, 23, 502, 4867, 10, 11435, 3444, 41, 1294, 9844, 1884, 903, 76849, 1542, 42732, 1723, 35254, 19, 16, 2071, 442, 7722, 31577, 2046, 111, 7, 6528, 19659, 6048, 68185, 678, 63667, 238 ]
[ 0.16943359375, 0.24609375, 0.07440185546875, 0.252197265625, 0.09649658203125, 0.045501708984375, 0.153564453125, 0.238525390625, 0.009124755859375, 0.1116943359375, 0.055694580078125, 0.1214599609375, 0.16552734375, 0.034942626953125, 0.0753173828125, 0.0897216796875, 0.222778320312...
embed
34543901_c0
34543901
prolog
0
Title: saving console output to a query in file Problem title: saving console output to a query in file Tags: prolog Problem: saving console output to a query in file I use Swi-prolog for windows and want to save answer to a query in file. for a simple example,suppose: the'input.pl' file has these predicates: parent(a,...
saving console output to a query in file saving console output to a query in file prolog output.txt Stream saving console output to a query in file I use Swi-prolog for windows and want to save answer to a query in file. for a simple example,suppose: the'input.pl' file has these predicates: So, with calling 'answer' qu...
[ 0.00762939453125, 0.0380859375, 0.0203857421875, -0.004302978515625, -0.01190185546875, 0.00616455078125, 0.00121307373046875, 0.01190185546875, -0.01318359375, -0.0240478515625, -0.00147247314453125, 0.00433349609375, -0.0000705718994140625, 0.022216796875, 0.0189208984375, -0.0189208...
[ 57, 6496, 130250, 140992, 47, 41, 1294, 23, 11435, 502, 4867, 124326, 115061, 105432, 3454, 54825, 3444, 30098, 35166, 8781, 27781, 73, 7077, 2424, 1653, 2063, 159029, 10133, 6488, 63736 ]
[ 0.0816650390625, 0.05560302734375, 0.228759765625, 0.222412109375, 0.1268310546875, 0.10443115234375, 0.130615234375, 0.0675048828125, 0.1546630859375, 0.133544921875, 0.1822509765625, 0.195068359375, 0.1605224609375, 0.1529541015625, 0.0970458984375, 0.06024169921875, 0.052947998046...
embed
7411258_c0
7411258
prolog
0
Title: Prolog print statement does not work as expected Problem title: Prolog print statement does not work as expected Tags: prolog Problem: Prolog print statement does not work as expected I was trying to define a functor and print each individual items of list in Prolog, but Prolog is not printing in correct format....
Prolog print statement does not work as expected Prolog print statement does not work as expected prolog Prolog _L139 Prolog print statement does not work as expected I was trying to define a functor and print each individual items of list in Prolog, but Prolog is not printing in correct format. the output is like rint...
[ -0.0023193359375, 0.001800537109375, -0.004913330078125, 0.006622314453125, -0.017333984375, 0.005645751953125, -0.009521484375, 0.003265380859375, 0.0018310546875, -0.00060272216796875, 0.01141357421875, -0.004974365234375, -0.00958251953125, -0.00182342529296875, -0.0003108978271484375...
[ 1250, 4867, 28412, 63805, 959, 4488, 237, 84751, 502, 866, 133826, 31577, 61924, 7477, 18770, 12638, 11651, 55769, 5303, 2448, 1916, 26785, 9384, 70, 140992, 1884, 5277, 18, 132, 11, 91, 334, 238, 29568, 41206, 69307, 159029, 4358, 52080, ...
[ 0.1861572265625, 0.2430419921875, 0.23046875, 0.2376708984375, 0.1160888671875, 0.143310546875, 0.1405029296875, 0.15771484375, 0.12890625, 0.06683349609375, 0.22705078125, 0.0192108154296875, 0.09600830078125, 0.1253662109375, 0.1578369140625, 0.025177001953125, 0.020751953125, 0....
embed
24798921_c1
24798921
prolog
1
203,_207....]),_179) My solution / workaround is as follows: findall(L, ( minimize(my_labeling(MaxLabelingTime,LabelingResult,VarsList,Es), Es, [all]), L = [Es,LabelingResult] ), Ls) my_labeling(MaxLabelingTime, LabelingResult, VarsList,Es):- labeling([time_out(MaxLabelingTime,LabelingResult)], VarsList), ( LabelingRes...
203,_207....]),_179) My solution / workaround is as follows: findall(L, ( minimize(my_labeling(MaxLabelingTime,LabelingResult,VarsList,Es), Es, [all]), L = [Es,LabelingResult] ), Ls) my_labeling(MaxLabelingTime, LabelingResult, VarsList,Es):- labeling([time_out(MaxLabelingTime,LabelingResult)], VarsList), ( LabelingRes...
[ 0.00341796875, -0.023681640625, 0.00738525390625, -0.0030670166015625, -0.009033203125, 0.026611328125, -0.00408935546875, -0.00421142578125, 0.017822265625, -0.053466796875, 0.0225830078125, -0.0245361328125, 0.008056640625, -0.00005841255187988281, 0.0244140625, -0.004791259765625, ...
[ 106108, 304, 15620, 75606, 93917, 2646, 29806, 4488, 11, 67688, 28960, 7413, 5584, 132, 866, 881, 77651, 1176, 152526, 214, 71346, 97381, 60096, 70059, 7, 7136, 81827, 154663, 16474, 247, 1184, 4, 339, 2203, 759, 129214, 3323, 67967, 6032, ...
[ 0.2464599609375, 0.05474853515625, 0.1578369140625, 0.0323486328125, 0.18798828125, 0.0233154296875, 0.1300048828125, 0.09375, 0.002655029296875, 0.140869140625, 0.06439208984375, 0.1859130859375, 0.262939453125, 0.0311279296875, 0.16455078125, 0.17724609375, 0.217529296875, 0.1071...
embed
61418566_c0
61418566
prolog
0
Title: run length decoding of a list in prolog? Problem title: run length decoding of a list in prolog? Tags: decode, run-length-encoding, prolog, list Problem: run length decoding of a list in prolog? I'm trying to decode a given list for example mydecode([(a,1), (b,2), (c,3), (d,2)],X) should give X = ['a','b','b','c...
run length decoding of a list in prolog? run length decoding of a list in prolog? decode run-length-encoding prolog list is_list run length decoding of a list in prolog? I'm trying to decode a given list for example mydecode([(a,1), (b,2), (c,3), (d,2)],X) should give X = ['a','b','b','c','c','c','d','d']. What is the ...
[ 0.0036773681640625, 0.00543212890625, 0.01385498046875, 0.0272216796875, -0.006439208984375, 0.0084228515625, -0.01422119140625, 0.0164794921875, 0.028076171875, -0.0186767578125, 0.01275634765625, -0.0234375, 0.0081787109375, 0.0003986358642578125, -0.005462646484375, 0.0179443359375,...
[ 11675, 140909, 8, 587, 6238, 111, 5303, 23, 502, 4867, 32, 40899, 23986, 927, 66332, 83, 6562, 31577, 34475, 759, 112, 11, 17727, 275, 10461, 21320, 71, 1542, 5608, 8337, 1193, 2203, 238, 18499, 18151 ]
[ 0.16357421875, 0.1650390625, 0.1514892578125, 0.152099609375, 0.0491943359375, 0.030426025390625, 0.1654052734375, 0.052490234375, 0.15283203125, 0.20361328125, 0.0032958984375, 0.224609375, 0.092041015625, 0.05340576171875, 0.1407470703125, 0.08624267578125, 0.18212890625, 0.04699...
embed
30103990_c0
30103990
prolog
0
Title: Compile Latex from Prolog Problem title: Compile Latex from Prolog Tags: prolog, latex, shell Problem: Compile Latex from Prolog I wrote a Prolog predicate that generates a Latex file, and I am looking for a way to be able to compile such a file automatically, within Prolog, to return instead the associated PDF ...
Compile Latex from Prolog Compile Latex from Prolog prolog latex shell Prolog Compile Latex Compile Latex from Prolog I wrote a Prolog predicate that generates a Latex file, and I am looking for a way to be able to compile such a file automatically, within Prolog, to return instead the associated PDF file. I have found...
[ 0.0137939453125, 0.01397705078125, -0.00970458984375, 0.006072998046875, -0.0047607421875, 0.0181884765625, 0.00885009765625, 0.00177001953125, -0.025146484375, -0.042236328125, -0.0030670166015625, 0.0289306640625, -0.007171630859375, -0.01300048828125, 0.024169921875, -0.000820159912...
[ 15612, 1340, 239, 24371, 1295, 1250, 4867, 502, 21, 128019, 54397, 1653, 2063, 67, 139392, 11435, 16487, 3917, 19048, 9969, 6044, 191082, 28032, 30646, 64457, 137272, 6859, 14037, 2452, 3454, 2424, 29713, 669, 19714, 12477, 26366, 155965, 448...
[ 0.191162109375, 0.1580810546875, 0.1424560546875, 0.26171875, 0.129150390625, 0.16748046875, 0.228759765625, 0.08837890625, 0.039886474609375, 0.2496337890625, 0.0166473388671875, 0.1376953125, 0.1427001953125, 0.03472900390625, 0.0733642578125, 0.1331787109375, 0.00103759765625, 0...
embed
54286499_c0
54286499
prolog
0
Title: how to solve the error in this prolog code Problem title: how to solve the error in this prolog code Tags: prolog Problem: how to solve the error in this prolog code What is wrong in this code frequency(f1). frequency(f2). frequency(f3). allocation(z1,z2,z3,z4,z5,z6,z7,z8) :- frequency(z1), frequency(z2), freque...
how to solve the error in this prolog code how to solve the error in this prolog code prolog how to solve the error in this prolog code What is wrong in this code syntax error: . or operator expected after expression
[ 0.0172119140625, 0.017578125, -0.0159912109375, 0.011962890625, -0.0177001953125, -0.01806640625, -0.0169677734375, 0.0069580078125, -0.0118408203125, -0.004364013671875, 0.01495361328125, 0.0030517578125, 0.036865234375, -0.015625, 0.01116943359375, -0.005950927734375, -0.0069580078...
[ 3642, 86869, 18499, 23, 903, 502, 4867, 18151, 47, 70, 83, 44691, 6002, 86531, 5, 707, 39933, 84751, 7103, 125195 ]
[ 0.07012939453125, 0.19775390625, 0.2220458984375, 0.0987548828125, 0.13427734375, 0.19287109375, 0.2261962890625, 0.160888671875, 0.07012939453125, 0.006053924560546875, 0.0103607177734375, 0.15576171875, 0.048919677734375, 0.1612548828125, 0.1593017578125, 0.1068115234375, 0.2299804...
embed
61389045_c0
61389045
prolog
0
Title: Make multiple replacements in a list by index Problem title: Make multiple replacements in a list by index Tags: prolog Problem: Make multiple replacements in a list by index I have this program that makes multiple replacements in a list given by another list with pairs in the format (Index, Elem). Example: repl...
Make multiple replacements in a list by index Make multiple replacements in a list by index prolog Make Example replace_multiple Lst However What Make multiple replacements in a list by index I have this program that makes multiple replacements in a list given by another list with pairs in the format (Index, Elem).
[ -0.0257568359375, 0.003875732421875, 0.0186767578125, 0.0177001953125, -0.013427734375, 0.003692626953125, -0.019287109375, -0.000568389892578125, 0.0194091796875, 0.0263671875, -0.00732421875, -0.01043701171875, -0.006439208984375, -0.0013580322265625, 0.004852294921875, -0.0035400390...
[ 26176, 48716, 91995, 9035, 23, 10, 5303, 390, 63262, 502, 4867, 89536, 8705, 144227, 339, 271, 33306, 4865, 765, 903, 1528, 30482, 34475, 15700, 80836, 9384, 4153, 39659, 540, 195 ]
[ 0.115478515625, 0.26806640625, 0.2060546875, 0.14892578125, 0.09490966796875, 0.034210205078125, 0.203369140625, 0.1263427734375, 0.240966796875, 0.1224365234375, 0.192626953125, 0.12091064453125, 0.1241455078125, 0.1756591796875, 0.06622314453125, 0.145751953125, 0.0266571044921875,...
embed
74633430_c2
74633430
prolog
2
s],(X,Y)) :- list_to_commalist(Xs,Y). attribute_goals(Var) --> { get_atts(Var,+ground_t(Cs)) }, cliques_to_goal(Cs). Code signals: Reifying, Prolog, Attributed, Variables, ground_t, Term, use_module, term_variables, create_mutable, MVs, attach_to_new_vars, get_atts, Cs0, put_atts, MVs-T, cliques_var_goals__ground, Goal...
s],(X,Y)) :- list_to_commalist(Xs,Y). attribute_goals(Var) --> { get_atts(Var,+ground_t(Cs)) }, cliques_to_goal(Cs). Code signals: Reifying, Prolog, Attributed, Variables, ground_t, Term, use_module, term_variables, create_mutable, MVs, attach_to_new_vars, get_atts, Cs0, put_atts, MVs-T, cliques_var_goals__ground, Goal...
[ 0.00927734375, 0.0120849609375, -0.007293701171875, -0.0087890625, -0.00958251953125, -0.00186920166015625, 0.0038604736328125, -0.0103759765625, -0.005615234375, 0.00118255615234375, 0.00970458984375, -0.0108642578125, -0.0014801025390625, -0.01116943359375, -0.0087890625, 0.017822265...
[ 91, 268, 4, 132, 1542, 1723, 15772, 5303, 188, 277, 192, 6562, 7, 194, 150380, 13, 519, 16765, 81827, 129908, 2046, 27639, 1328, 64330, 18, 441, 84435, 289, 28864, 26073, 12, 853, 151138, 1250, 4867, 191145, 71, 111477, 13566, 61585, 29...
[ 0.1328125, 0.134765625, 0.0888671875, 0.011260986328125, 0.1417236328125, 0.167236328125, 0.0797119140625, 0.2220458984375, 0.1727294921875, 0.0953369140625, 0.1722412109375, 0.267822265625, 0.09552001953125, 0.073974609375, 0.228515625, 0.0894775390625, 0.1884765625, 0.17333984375...
embed
55837936_c1
55837936
prolog
1
2,12,3) at div.pl:63 ERROR: [8] div(_2910,15,3) at div.pl:63 ERROR: [7] <user> I kinda understand what the errors want to tell me but I just don't get why it won't work as I expect it to work. It gets that the quotient is 0 if dividend is 0 and from there on it should just add 1s until it is back at the first call but ...
2,12,3) at div.pl:63 ERROR: [8] div(_2910,15,3) at div.pl:63 ERROR: [7] <user> I kinda understand what the errors want to tell me but I just don't get why it won't work as I expect it to work. It gets that the quotient is 0 if dividend is 0 and from there on it should just add 1s until it is back at the first call but ...
[ -0.01519775390625, 0.0191650390625, -0.006561279296875, -0.01141357421875, 0.002593994140625, 0.0201416015625, 0.01220703125, -0.0196533203125, 0.0224609375, 0.001312255859375, 0.019287109375, -0.005157470703125, 0.0057373046875, 0.03125, 0.00921630859375, -0.0184326171875, 0.0117187...
[ 116538, 155761, 16, 99, 18221, 2424, 15748, 151206, 24638, 120410, 4235, 963, 1837, 21320, 117221, 65918, 8562, 28219, 18499, 7, 3444, 14192, 18, 2046, 15400, 442, 23742, 4488, 237, 41206, 62163, 70, 41502, 18750, 83, 757, 2174, 132179, 560...
[ 0.1324462890625, 0.1671142578125, 0.013824462890625, 0.04266357421875, 0.166015625, 0.0784912109375, 0.194091796875, 0.1407470703125, 0.1324462890625, 0.061859130859375, 0.1680908203125, 0.1781005859375, 0.1304931640625, 0.0953369140625, 0.00140380859375, 0.033172607421875, 0.0131225...
embed
10976802_c0
10976802
prolog
0
Title: ERROR: Undefined procedure: (+)/2 Problem title: ERROR: Undefined procedure: (+)/2 Tags: prolog, primes Problem: ERROR: Undefined procedure: (+)/2 I'm new in SWI-Prolog and I want to check prime function in Prolog. prime(N) :- N > 1, M is N - 1, check(N, M). check(_, 1). check(N, M) :- M > 1, R is N - M * N / M,...
ERROR: Undefined procedure: (+)/2 ERROR: Undefined procedure: (+)/2 prolog primes ERROR Undefined ERROR: Undefined procedure: (+)/2 I'm new in SWI-Prolog and I want to check prime function in Prolog. but when I ask 2 + 2 or another operator like (*)/2 , (/)/2 ,... in Prolog it says: undefined procedure: (+)/2 . I think...
[ -0.004669189453125, 0.027099609375, 0.0174560546875, 0.0260009765625, -0.00213623046875, 0.0155029296875, 0.00457763671875, -0.0033111572265625, 0.00970458984375, -0.052978515625, 0.004638671875, -0.0208740234375, -0.00052642822265625, -0.0150146484375, 0.004180908203125, -0.0017700195...
[ 151206, 24638, 79912, 5983, 297, 50491, 22183, 12477, 502, 4867, 20809, 3525, 159, 38969, 10752, 12765, 32354, 1250, 26458, 116, 997, 39933, 80019, 64, 9232, 12, 1957, 707, 14192, 456, 162, 31304, 65918, 18499, 74918, 13438 ]
[ 0.13623046875, 0.1131591796875, 0.157958984375, 0.2232666015625, 0.1246337890625, 0.22607421875, 0.22607421875, 0.280029296875, 0.155517578125, 0.22607421875, 0.2314453125, 0.034271240234375, 0.060028076171875, 0.189453125, 0.12890625, 0.15673828125, 0.150390625, 0.1666259765625, ...
embed
50503364_c0
50503364
prolog
0
Title: is/2: Arguments are not sufficiently instantiated Problem title: is/2: Arguments are not sufficiently instantiated Tags: prolog, instantiation-error Problem: is/2: Arguments are not sufficiently instantiated I am trying to write a prolog code to find Bezout constants for gcd. I tried this code : gcdCoef(A,B,X,Y)...
is/2: Arguments are not sufficiently instantiated is/2: Arguments are not sufficiently instantiated prolog instantiation-error Arguments is/2: Arguments are not sufficiently instantiated I am trying to write a prolog code to find Bezout constants for gcd. I tried this code : gcdCoef(A,B,X,Y) :- Z is A*X + B*Y, gcd(A,B,...
[ 0.000751495361328125, 0.02490234375, 0.005218505859375, 0.0021514892578125, 0.0123291015625, 0.0107421875, 0.003448486328125, -0.01324462890625, 0.01513671875, 0.0213623046875, 0.02294921875, -0.027099609375, 0.0166015625, 0.007476806640625, 0.01263427734375, 0.017578125, -0.00109100...
[ 83, 12477, 12, 112140, 7, 621, 959, 129980, 538, 34648, 14, 27686, 502, 4867, 188800, 31577, 33022, 18151, 7413, 15967, 6056, 53697, 22109, 71, 37842, 10625, 4240, 284, 571, 1542, 1723, 567, 62, 1639, 997, 335, 1511, 3229, 211603, 41, 1...
[ 0.1947021484375, 0.258544921875, 0.05975341796875, 0.252197265625, 0.10235595703125, 0.07275390625, 0.1650390625, 0.1998291015625, 0.0904541015625, 0.1478271484375, 0.1383056640625, 0.1021728515625, 0.154541015625, 0.2144775390625, 0.163330078125, 0.0163726806640625, 0.0003662109375,...
embed
63093914_c0
63093914
prolog
0
Title: Bind a list in prolog Problem title: Bind a list in prolog Tags: list, prolog Problem: Bind a list in prolog I have a sort algorithm and I am trying to call a list but i seems only garbage variable. What is the right way? This is what I got: ?- sort(list(K),Sorted). K = Sorted, Sorted = [[_3796]] This is the cod...
Bind a list in prolog Bind a list in prolog list prolog Bind Sorted _3796 Head Tail Bind a list in prolog I have a sort algorithm and I am trying to call a list but i seems only garbage variable. What is the right way? This is what I got: This is the code: I don't have to do this:
[ -0.00054168701171875, 0.018798828125, 0.0189208984375, -0.0111083984375, -0.01348876953125, 0.000644683837890625, -0.01324462890625, -0.004852294921875, 0.00494384765625, -0.01275634765625, -0.005645751953125, -0.00634765625, -0.020263671875, 0.01507568359375, 0.004852294921875, 0.0009...
[ 16666, 71, 5303, 23, 502, 4867, 53666, 297, 10945, 11648, 44816, 1218, 379, 10, 12096, 234873, 31577, 11782, 4734, 3671, 402, 429, 77336, 7108, 3917, 18151, 18, 765 ]
[ 0.199462890625, 0.1083984375, 0.2335205078125, 0.06268310546875, 0.1455078125, 0.224365234375, 0.1783447265625, 0.078857421875, 0.045074462890625, 0.109619140625, 0.11700439453125, 0.1087646484375, 0.09820556640625, 0.01110076904296875, 0.1846923828125, 0.169677734375, 0.037078857421...
embed
36791736_c0
36791736
prolog
0
Title: How to use clpfd in eclipseCLP prolog (no eclipse java IDE) Problem title: How to use clpfd in eclipseCLP prolog (no eclipse java IDE) Tags: prolog, eclipse-clp, clpfd Problem: How to use clpfd in eclipseCLP prolog (no eclipse java IDE) I'm trying to make a simple route plan with CLP in prolog using eclipseclp a...
How to use clpfd in eclipseCLP prolog (no eclipse java IDE) How to use clpfd in eclipseCLP prolog (no eclipse java IDE) prolog eclipse-clp clpfd How IDE use_module How to use clpfd in eclipseCLP prolog (no eclipse java IDE) I'm trying to make a simple route plan with CLP in prolog using eclipseclp and I want to use the...
[ 0.00213623046875, 0.005828857421875, 0.000637054443359375, 0.026611328125, 0.0023956298828125, 0.006744384765625, 0.018310546875, -0.003265380859375, 0.00201416015625, -0.07177734375, -0.018798828125, -0.03857421875, -0.00109100341796875, 0.0152587890625, 0.0184326171875, -0.0035095214...
[ 11249, 47, 4527, 33139, 39557, 71, 23, 106371, 184, 441, 37352, 502, 4867, 157, 79, 330, 36497, 238, 26775, 83279, 28, 8781, 36439, 1774, 313, 17368, 3444, 35773, 1294, 9969, 34759, 18, 125296, 2856, 18499, 765, 20600, 756, 50960, 19085, ...
[ 0.04827880859375, 0.0194549560546875, 0.142578125, 0.145751953125, 0.177734375, 0.2220458984375, 0.043731689453125, 0.18798828125, 0.112548828125, 0.047821044921875, 0.25732421875, 0.1416015625, 0.181884765625, 0.0673828125, 0.0638427734375, 0.1173095703125, 0.1845703125, 0.0251464...
embed
59757430_c2
59757430
prolog
2
random_float, Out = [X-Size|R], oracle_rands_explicit_last_call(R,NewSize). oracle_rands_explicit_last_call([],0). ?- oracle_rands_explicit_last_call(X,4). X = [0.6450176209046125-4, 0.5605468429780708-3, Code signals: Naively, Prolog, Slowest, Uses, Stack, oracle_rands_explicit, Out, Size, NewSize, Size-1, random_flo...
random_float, Out = [X-Size|R], oracle_rands_explicit_last_call(R,NewSize). oracle_rands_explicit_last_call([],0). ?- oracle_rands_explicit_last_call(X,4). X = [0.6450176209046125-4, 0.5605468429780708-3, Code signals: Naively, Prolog, Slowest, Uses, Stack, oracle_rands_explicit, Out, Size, NewSize, Size-1, random_flo...
[ 0.01324462890625, -0.00823974609375, 0.007415771484375, -0.0062255859375, -0.00064849853515625, 0.01287841796875, 0.01324462890625, -0.0123291015625, 0.0291748046875, 0.004608154296875, 0.018798828125, 0.0126953125, -0.010498046875, -0.006072998046875, 0.0255126953125, -0.0040588378906...
[ 96759, 52347, 257, 13538, 2203, 1542, 127167, 1052, 3620, 11030, 37214, 7, 83613, 60923, 19777, 85763, 46568, 77495, 705, 29557, 1193, 122887, 60450, 160037, 2588, 11565, 81730, 4598, 155670, 99263, 188734, 8316, 28864, 26073, 353, 5844, 1250, ...
[ 0.2371826171875, 0.2398681640625, 0.1435546875, 0.2398681640625, 0.06378173828125, 0.09918212890625, 0.1495361328125, 0.053680419921875, 0.1474609375, 0.1982421875, 0.22509765625, 0.044036865234375, 0.0736083984375, 0.20166015625, 0.1102294921875, 0.1773681640625, 0.04559326171875, ...
embed
70897627_c0
70897627
prolog
0
Title: Prolog list exercise Problem title: Prolog list exercise Tags: prolog Problem: Prolog list exercise Here is my exercise: define a predicate in prolog which, applied to a list L of integers, gives as a result the list of the successors of the even elements present in L. The code i wrote work only if one element i...
Prolog list exercise Prolog list exercise prolog Prolog list_even Prolog list exercise Here is my exercise: define a predicate in prolog which, applied to a list L of integers, gives as a result the list of the successors of the even elements present in L. The code i wrote work only if one element is even , can someone...
[ 0.006927490234375, 0.02197265625, 0.0087890625, -0.0189208984375, 0.010498046875, 0.03515625, -0.01263427734375, 0.00421142578125, 0.028076171875, -0.0322265625, 0.0111083984375, -0.0140380859375, -0.017333984375, 0.0224609375, 0.01165771484375, 0.0225830078125, 0.025146484375, 0.0...
[ 1250, 4867, 5303, 81979, 502, 26301, 61924, 1653, 2063, 67, 23, 190659, 339, 892, 26255, 76199, 16750, 39457, 4295, 3853, 80854, 13379, 18151, 54397, 4488, 4734, 2174, 1632, 12830, 83, 4358, 26366, 44691 ]
[ 0.162353515625, 0.24755859375, 0.2060546875, 0.1954345703125, 0.1776123046875, 0.1719970703125, 0.14306640625, 0.1815185546875, 0.2352294921875, 0.1392822265625, 0.012115478515625, 0.10284423828125, 0.10498046875, 0.1195068359375, 0.036651611328125, 0.06500244140625, 0.04861450195312...
embed
14042320_c0
14042320
prolog
0
Title: Prolog - why does variable not get bound? Problem title: Prolog - why does variable not get bound? Tags: list, prolog Problem: Prolog - why does variable not get bound? I have defined a goal lowerpartition/3 as follows: lowerpartition(X,P,Z) :- var(Z),!,lowerpartition(X,P,[]). lowerpartition([],_,_). lowerpartit...
Prolog - why does variable not get bound? Prolog - why does variable not get bound? list prolog Prolog Prolog - why does variable not get bound? I have defined a goal lowerpartition/3 as follows: when I call I expect X to be bound to the list [3,2,1], but Prolog just returns false. What am I doing incorrectly?
[ -0.006072998046875, 0.0152587890625, 0.00677490234375, -0.0108642578125, -0.019775390625, 0.016357421875, -0.00089263916015625, -0.0118408203125, 0.00714111328125, 0.04052734375, 0.00433349609375, -0.0130615234375, -0.003753662109375, -0.002532958984375, 0.01007080078125, 0.02062988281...
[ 1250, 4867, 15400, 14602, 77336, 959, 2046, 99091, 5303, 502, 61924, 69236, 92319, 15866, 1363, 18113, 11782, 41206, 1193, 30646, 98320, 214552 ]
[ 0.1534423828125, 0.263916015625, 0.1395263671875, 0.09930419921875, 0.2978515625, 0.14501953125, 0.1146240234375, 0.254638671875, 0.1470947265625, 0.09906005859375, 0.0892333984375, 0.1944580078125, 0.15234375, 0.1370849609375, 0.031219482421875, 0.1607666015625, 0.1251220703125, 0...
embed
27331310_c0
27331310
prolog
0
Title: prolog write langford sequence ERROR: toplevel: Undefined procedure: langford/1 Problem title: prolog write langford sequence ERROR: toplevel: Undefined procedure: langford/1 Tags: prolog Problem: prolog write langford sequence ERROR: toplevel: Undefined procedure: langford/1 I'm trying to write langford sequenc...
prolog write langford sequence ERROR: toplevel: Undefined procedure: langford/1 prolog write langford sequence ERROR: toplevel: Undefined procedure: langford/1 prolog ERROR Undefined langford4 langford42 prolog write langford sequence ERROR: toplevel: Undefined procedure: langford/1 I'm trying to write langford sequenc...
[ 0.016357421875, 0.0250244140625, -0.01397705078125, 0.0157470703125, -0.02880859375, -0.00982666015625, -0.026123046875, 0.0201416015625, 0.0191650390625, -0.03369140625, -0.01190185546875, 0.004791259765625, -0.003082275390625, 0.0142822265625, 0.0126953125, 0.00130462646484375, -0....
[ 502, 4867, 33022, 1937, 13534, 40, 944, 3956, 151206, 24638, 2663, 67919, 79912, 5983, 50491, 11583, 297, 617, 13023, 31577, 1884, 903, 3293, 83, 2367, 17, 765, 16940, 707, 45458 ]
[ 0.14208984375, 0.2333984375, 0.1636962890625, 0.14208984375, 0.25244140625, 0.055999755859375, 0.13818359375, 0.10986328125, 0.1702880859375, 0.133544921875, 0.09521484375, 0.2027587890625, 0.0950927734375, 0.190673828125, 0.1783447265625, 0.1287841796875, 0.006195068359375, 0.1291...
embed
19755319_c0
19755319
prolog
0
Title: Prolog- repeat input until Problem title: Prolog- repeat input until Tags: repeat, prolog Problem: Prolog- repeat input until I want to create a predicate that only accepts a specific input from the user and it will keep asking for the right input if the user gives the wrong input. I've created this, but its not...
Prolog- repeat input until Prolog- repeat input until repeat prolog Prolog get_char Prolog- repeat input until I want to create a predicate that only accepts a specific input from the user and it will keep asking for the right input if the user gives the wrong input. I've created this, but its not completed because it ...
[ -0.01397705078125, 0.000820159912109375, 0.000904083251953125, 0.0225830078125, -0.0018463134765625, 0.003692626953125, 0.0150146484375, 0.003997802734375, -0.006317138671875, -0.02001953125, 0.00946044921875, 0.010498046875, -0.0260009765625, 0.01611328125, 0.00885009765625, 0.0084228...
[ 1250, 4867, 119140, 107730, 24189, 502, 2046, 9254, 3444, 28282, 1653, 2063, 67, 4734, 26946, 29458, 1295, 38937, 13695, 113292, 100, 7108, 2174, 76199, 44691, 75935, 903, 6863, 959, 140528, 26458, 3525 ]
[ 0.16552734375, 0.2442626953125, 0.230712890625, 0.1934814453125, 0.124267578125, 0.1285400390625, 0.04864501953125, 0.2052001953125, 0.0604248046875, 0.1424560546875, 0.1541748046875, 0.2279052734375, 0.1165771484375, 0.05682373046875, 0.1192626953125, 0.1280517578125, 0.034454345703...
embed
8208302_c0
8208302
prolog
0
Title: how to start artificial-intelligence programming? Problem title: how to start artificial-intelligence programming? Tags: artificial-intelligence, prolog Problem: how to start artificial-intelligence programming? hi I am currently a PHP developer . I haven't done any thing in artificial intelligence but I like to...
how to start artificial-intelligence programming? how to start artificial-intelligence programming? artificial-intelligence prolog PHP LISP PRO-LOG how to start artificial-intelligence programming? hi I am currently a PHP developer . I haven't done any thing in artificial intelligence but I like to start artificial int...
[ 0.0120849609375, 0.01263427734375, -0.002471923828125, 0.03759765625, -0.01409912109375, 0.0267333984375, -0.00372314453125, 0.0242919921875, 0.0031890869140625, -0.05712890625, 0.033935546875, 0.00090789794921875, -0.018798828125, 0.015625, 0.0220947265625, -0.01361083984375, -0.014...
[ 3642, 47, 4034, 66733, 9, 130687, 56037, 449, 32, 502, 4867, 47302, 16970, 9434, 10514, 47510, 1274, 444, 82424, 10, 106001, 38246, 18, 16940, 2499, 13580, 23, 1284, 1884, 6, 3714, 2685, 46876, 54, 87, 2046, 26859, 24610, 831, 42459, 16...
[ 0.136962890625, 0.1217041015625, 0.2037353515625, 0.2261962890625, 0.12890625, 0.2357177734375, 0.22509765625, 0.1639404296875, 0.061767578125, 0.1331787109375, 0.1951904296875, 0.20166015625, 0.134765625, 0.2001953125, 0.1695556640625, 0.206787109375, 0.056121826171875, 0.00045776...
embed
30852533_c0
30852533
prolog
0
Title: Avoid recursion in predicate Problem title: Avoid recursion in predicate Tags: prolog Problem: Avoid recursion in predicate I have the following question for the following predicate, how can i drop the recursive call f(T,S1) from both predicates. Flow model: (i,o) f([],0). f([H|T],S):- f(T,S1), S1 > 2,!, S is S1...
Avoid recursion in predicate Avoid recursion in predicate prolog Avoid Avoid recursion in predicate I have the following question for the following predicate, how can i drop the recursive call f(T,S1) from both predicates. Flow model: (i,o) This is a trick question, and I am not that good with prolog. the second predic...
[ -0.01531982421875, 0.00848388671875, -0.00970458984375, -0.00191497802734375, -0.0150146484375, 0.002410888671875, 0.00799560546875, 0.0155029296875, 0.00213623046875, -0.041015625, 0.0286865234375, -0.001922607421875, -0.016845703125, 0.01123046875, 0.041748046875, 0.00921630859375, ...
[ 84361, 532, 195625, 1830, 23, 1653, 2063, 67, 502, 4867, 9655, 25632, 3642, 831, 17, 36069, 70, 5844, 11782, 1238, 618, 4, 294, 17727, 1295, 15044, 1636, 563, 17336, 3299, 14, 31, 88308, 4127, 17932, 35782, 11343, 1369, 977, 297, 55300,...
[ 0.1817626953125, 0.1461181640625, 0.2244873046875, 0.1148681640625, 0.060089111328125, 0.1724853515625, 0.2000732421875, 0.04425048828125, 0.134521484375, 0.1951904296875, 0.00274658203125, 0.0311279296875, 0.04205322265625, 0.04095458984375, 0.00811767578125, 0.2437744140625, 0.0188...
embed
53200402_c2
53200402
prolog
2
_); step(_, Move)), [F, O, T] = Move, NewPegsLeft is PegsLeft-1, set_at(F, CellList, 0, 1, NewCellList0), set_at(O, NewCellList0, 0, 1, NewCellList1), set_at(T, NewCellList1, 1, 0, NewCellListFinal), BoardAfterMove = [NewPegsLeft, NewCellListFinal]. Thanks!! Code signals: Copy, Prolog, k-1, None, use_module, Step, Rev...
_); step(_, Move)), [F, O, T] = Move, NewPegsLeft is PegsLeft-1, set_at(F, CellList, 0, 1, NewCellList0), set_at(O, NewCellList0, 0, 1, NewCellList1), set_at(T, NewCellList1, 1, 0, NewCellListFinal), BoardAfterMove = [NewPegsLeft, NewCellListFinal]. Thanks!! Code signals: Copy, Prolog, k-1, None, use_module, Step, Rev...
[ 0.0047607421875, -0.006988525390625, 0.0108642578125, 0.036865234375, -0.0025482177734375, -0.0052490234375, -0.0009918212890625, 0.0211181640625, 0.0224609375, 0.00738525390625, -0.01531982421875, 0.032470703125, -0.00494384765625, 0.001434326171875, -0.007049560546875, -0.0224609375,...
[ 3142, 29954, 454, 135828, 919, 180, 384, 2203, 2356, 18144, 9405, 5267, 2480, 83, 1460, 5759, 5423, 257, 80743, 154663, 757, 106, 6796, 77495, 4, 670, 618, 6159, 62554, 46327, 9083, 272, 46568, 6236, 1146, 28864, 26073, 7, 146930, 1250, ...
[ 0.071533203125, 0.2432861328125, 0.015411376953125, 0.250732421875, 0.115966796875, 0.163330078125, 0.09130859375, 0.0911865234375, 0.129638671875, 0.18994140625, 0.16162109375, 0.112060546875, 0.206298828125, 0.063720703125, 0.1805419921875, 0.1610107421875, 0.127197265625, 0.0962...
embed
63965531_c0
63965531
prolog
0
Title: Prolog: Make double negation possible with an operator Problem title: Prolog: Make double negation possible with an operator Tags: prolog, double, logic, negation Problem: Prolog: Make double negation possible with an operator based on my question Prolog: define logical operator in Prolog as placeholder for othe...
Prolog: Make double negation possible with an operator Prolog: Make double negation possible with an operator prolog double logic negation Prolog Make Prolog: Make double negation possible with an operator based on my question Prolog: define logical operator in Prolog as placeholder for other operator for building a pr...
[ 0.01507568359375, 0.0035858154296875, 0.0291748046875, 0.006988525390625, -0.0019378662109375, 0.006317138671875, 0.004730224609375, 0.0087890625, -0.0018157958984375, -0.025146484375, -0.007415771484375, 0.0164794921875, -0.00156402587890625, -0.029296875, 0.00122833251953125, 0.01928...
[ 1250, 4867, 26176, 41929, 108, 125682, 7722, 678, 39933, 502, 62775, 35509, 61924, 289, 237, 3687, 31958, 3789, 33976, 89261, 19714, 2063, 3444, 3249, 185397, 170920, 11782, 1884, 32, 15772, 9, 11, 37105, 47, 6002, 86531, 18499, 3917, 86869...
[ 0.1737060546875, 0.2252197265625, 0.0552978515625, 0.178466796875, 0.181396484375, 0.17431640625, 0.154541015625, 0.0545654296875, 0.23974609375, 0.1448974609375, 0.1533203125, 0.004425048828125, 0.0936279296875, 0.1015625, 0.0171051025390625, 0.12060546875, 0.154052734375, 0.02587...
embed
19282506_c1
19282506
prolog
1
apacity)) :- capacity(j2,Capacity). update(jugs(C1,C2),transfer(j2,j1),jugs(W1,W2)) :- capacity(j1,Capacity), Water is C1 + C2, Overhang is Water - Capacity , adapt(Water,Overhang,W1,W2). update(jugs(C1,C2),transfer(j1,j2),jugs(W1,W2)) :- capacity(j2,Capacity), Water is C1 + C2, Overhang is Water - Capacity , adapt(Wat...
apacity)) :- capacity(j2,Capacity). update(jugs(C1,C2),transfer(j2,j1),jugs(W1,W2)) :- capacity(j1,Capacity), Water is C1 + C2, Overhang is Water - Capacity , adapt(Water,Overhang,W1,W2). update(jugs(C1,C2),transfer(j1,j2),jugs(W1,W2)) :- capacity(j2,Capacity), Water is C1 + C2, Overhang is Water - Capacity , adapt(Wat...
[ -0.006317138671875, 0.033203125, -0.00102996826171875, 0.0096435546875, 0.0028533935546875, 0.0135498046875, -0.03564453125, -0.00201416015625, 0.01202392578125, 0.03466796875, 0.02197265625, -0.007537841796875, -0.004669189453125, 0.006927490234375, 0.0152587890625, 0.00347900390625, ...
[ 2241, 60089, 16, 15772, 177399, 170, 304, 87926, 11, 28350, 461, 9405, 441, 418, 10461, 141325, 17727, 1456, 27646, 83, 313, 997, 9578, 8467, 14304, 39908, 107774, 156673, 77495, 2203, 16093, 757, 8437, 163324, 155761, 129745, 38, 28864, 26...
[ 0.1761474609375, 0.2291259765625, 0.008758544921875, 0.0977783203125, 0.293212890625, 0.1121826171875, 0.1539306640625, 0.1424560546875, 0.1529541015625, 0.1727294921875, 0.1553955078125, 0.1766357421875, 0.05987548828125, 0.0753173828125, 0.1239013671875, 0.178955078125, 0.0546875, ...
embed
52501163_c0
52501163
prolog
0
Title: How to implement Peano numbers exponentiation in Prolog? Problem title: How to implement Peano numbers exponentiation in Prolog? Tags: successor-arithmetics, prolog Problem: How to implement Peano numbers exponentiation in Prolog? I am trying to implement exponentiation with the code below, but a simple query li...
How to implement Peano numbers exponentiation in Prolog? How to implement Peano numbers exponentiation in Prolog? successor-arithmetics prolog How Peano Prolog How to implement Peano numbers exponentiation in Prolog? I am trying to implement exponentiation with the code below, but a simple query like 2^1 ( ex(s(s(0)), ...
[ 0.0022125244140625, 0.007720947265625, -0.001373291015625, 0.019287109375, 0.01214599609375, 0.006500244140625, 0.02587890625, 0.00262451171875, 0.00958251953125, -0.019775390625, 0.0164794921875, 0.00433349609375, -0.01422119140625, -0.0113525390625, 0.01239013671875, 0.00714111328125...
[ 11249, 47, 29479, 1460, 3922, 101935, 78643, 21616, 2320, 23, 1250, 4867, 39457, 42, 8962, 502, 31577, 678, 18151, 35064, 8781, 41, 116, 8353, 418, 1119, 177609, 91, 567, 10756, 7, 136993 ]
[ 0.078369140625, 0.008941650390625, 0.182373046875, 0.2159423828125, 0.2802734375, 0.1907958984375, 0.2000732421875, 0.1590576171875, 0.048431396484375, 0.04632568359375, 0.1939697265625, 0.255859375, 0.1441650390625, 0.024322509765625, 0.06195068359375, 0.1162109375, 0.05694580078125...
embed
60729273_c0
60729273
prolog
0
Title: To generate all the prime numbers using the isprime/1 build in function. Prolog Problem title: To generate all the prime numbers using the isprime/1 build in function. Prolog Tags: prolog, primes Problem: To generate all the prime numbers using the isprime/1 build in function. Prolog Question ask: ?- prime(X). T...
To generate all the prime numbers using the isprime/1 build in function. Prolog To generate all the prime numbers using the isprime/1 build in function. Prolog prolog primes the Prolog To generate all the prime numbers using the isprime/1 build in function. Prolog Question ask: ?- prime(X). The solution should look lik...
[ 0.000858306884765625, 0.0252685546875, 0.02734375, 0.006103515625, 0.0118408203125, 0.01129150390625, 0.01519775390625, -0.0208740234375, -0.016357421875, -0.033203125, -0.0093994140625, 0.0026702880859375, -0.0228271484375, 0.00439453125, 0.008544921875, 0.005889892578125, 0.0046997...
[ 717, 139392, 756, 70, 20809, 101935, 17368, 83, 114654, 11583, 45367, 23, 32354, 1250, 4867, 502, 7, 26458, 705, 9, 132, 1542, 29806, 5608, 6713, 1884, 903, 765, 24189, 5036, 15772, 119140, 23150 ]
[ 0.052764892578125, 0.196044921875, 0.1329345703125, 0.0716552734375, 0.258544921875, 0.2152099609375, 0.097412109375, 0.12353515625, 0.2763671875, 0.129638671875, 0.17724609375, 0.1556396484375, 0.1749267578125, 0.12451171875, 0.203857421875, 0.1031494140625, 0.01495361328125, 0.05...
embed
46665276_c0
46665276
prolog
0
Title: Why is this &quot;last_element&quot; prolog predicate more optimal? Problem title: Why is this &quot;last_element&quot; prolog predicate more optimal? Tags: prolog Problem: Why is this "last_element" prolog predicate more optimal? We want to check if an element appears in the last of a list, we have this prolog ...
Why is this &quot;last_element&quot; prolog predicate more optimal? Why is this &quot;last_element&quot; prolog predicate more optimal? prolog Why last_element Why is this "last_element" prolog predicate more optimal? We want to check if an element appears in the last of a list, we have this prolog program which is obv...
[ 0.003448486328125, 0.004974365234375, 0.006927490234375, 0.002197265625, -0.00885009765625, -0.0023040771484375, -0.01300048828125, -0.00848388671875, 0.01446533203125, -0.039794921875, 0.01708984375, -0.0128173828125, -0.0002841949462890625, -0.004852294921875, 0.005340576171875, 0.00...
[ 44084, 83, 903, 19777, 62766, 502, 4867, 1653, 2063, 67, 1286, 24087, 4568, 12765, 2174, 12830, 135179, 111, 5303, 1528, 162520, 117914, 29806, 442, 17932 ]
[ 0.1297607421875, 0.03875732421875, 0.051116943359375, 0.1947021484375, 0.2305908203125, 0.162109375, 0.21484375, 0.1400146484375, 0.156005859375, 0.043060302734375, 0.13671875, 0.2220458984375, 0.2041015625, 0.14794921875, 0.013885498046875, 0.193115234375, 0.0943603515625, 0.00097...
embed
26996358_c1
26996358
prolog
1
[x,'&&',y] Term after parsing: [G_123,'&&',G_456] (now featuring "real" Prolog variables) Assign a value from { boolean(t), boolean(f) } to the first unbound variable in T. simplify the term. ... repeat or backtrack until a assignment v is found so that v(T) = t or the search space is depleted. I'm pretty new to Prolo...
[x,'&&',y] Term after parsing: [G_123,'&&',G_456] (now featuring "real" Prolog variables) Assign a value from { boolean(t), boolean(f) } to the first unbound variable in T. simplify the term. ... repeat or backtrack until a assignment v is found so that v(T) = t or the search space is depleted. I'm pretty new to Prolo...
[ 0.0211181640625, 0.00274658203125, 0.005126953125, 0.0130615234375, 0.00787353515625, 0.013671875, -0.0024261474609375, -0.01483154296875, 0.0008544921875, -0.0208740234375, 0.005096435546875, 0.006378173828125, 0.000621795654296875, 0.00177764892578125, -0.01055908203125, 0.0297851562...
[ 425, 1230, 25, 53, 2994, 39, 7103, 366, 6953, 724, 48636, 121317, 35613, 241599, 30544, 1250, 4867, 77336, 7, 1301, 31304, 34292, 1295, 337, 31, 34677, 18, 420, 47, 5117, 51, 99091, 384, 112892, 18929, 13579, 119140, 707, 4420, 125728, ...
[ 0.0904541015625, 0.167724609375, 0.026763916015625, 0.119384765625, 0.1363525390625, 0.083984375, 0.090087890625, 0.153076171875, 0.09344482421875, 0.08599853515625, 0.238037109375, 0.251708984375, 0.0231170654296875, 0.09381103515625, 0.1673583984375, 0.1534423828125, 0.252685546875...
embed
18298228_c0
18298228
prolog
0
Title: curly brackets { } in DCG Problem title: curly brackets { } in DCG Tags: dcg, prolog Problem: curly brackets { } in DCG I am starting to learn how to use DCGs. I was wondering what curly braces {...} are used for? When (and when not) are they required? For example: read_lines --> { read_line_to_codes(current_inp...
curly brackets { } in DCG curly brackets { } in DCG dcg prolog DCG read_lines read_line_to_codes current_input Codes end_of_file atom_codes Line curly brackets { } in DCG I am starting to learn how to use DCGs. I was wondering what curly braces {...} are used for? When (and when not) are they required? For example: pro...
[ -0.002532958984375, -0.008056640625, 0.019775390625, -0.004974365234375, 0.000820159912109375, 0.0050048828125, 0.004241943359375, -0.006072998046875, 0.01556396484375, -0.0211181640625, -0.003204345703125, -0.0126953125, -0.007720947265625, -0.01507568359375, 0.0174560546875, -0.00074...
[ 9709, 538, 1620, 27853, 7, 23, 391, 56367, 104, 177, 502, 4867, 12301, 59801, 2256, 188, 40899, 43581, 28864, 3564, 4390, 29822, 34627, 16777, 72134, 30698, 4527, 149016, 2367, 5170, 11814, 100, 14847, 3229, 959, 1836, 56065, 84361, 532, ...
[ 0.21142578125, 0.201416015625, 0.2138671875, 0.2132568359375, 0.03173828125, 0.035491943359375, 0.09564208984375, 0.2091064453125, 0.008087158203125, 0.05181884765625, 0.0654296875, 0.1759033203125, 0.07281494140625, 0.05181884765625, 0.063720703125, 0.0792236328125, 0.1082763671875,...
embed
50426081_c0
50426081
prolog
0
Title: Recursive func Prolog Problem title: Recursive func Prolog Tags: prolog Problem: Recursive func Prolog I am new to Prolog. Not really able to get how it works. fillmap([HF|TF],[HG|TG],L,X,Y,Map1):- ... replace((EX,EY,none),Map1,(EX,EY,HF),Map2), ... (L1>0-> write("G0"),fillmap(TF,TG,L1,EX,EY,Map2); write("G=0"))...
Recursive func Prolog Recursive func Prolog prolog Recursive Prolog Map1 Map2 Recursive func Prolog I am new to Prolog. Not really able to get how it works. Map is a list. I am changing it in every recursive call and I can see it in the output by write func. But I want to get the changed Map where I am calling it. But ...
[ 0.0023040771484375, 0.00823974609375, 0.0125732421875, 0.00927734375, -0.029052734375, 0.01324462890625, -0.004974365234375, 0.003204345703125, 0.01361083984375, 0.006744384765625, 0.00970458984375, -0.006622314453125, -0.005950927734375, 0.017578125, 0.0179443359375, 0.000058889389038...
[ 853, 48650, 5844, 7477, 238, 1250, 4867, 502, 42719, 418, 304, 3525, 6183, 19048, 2046, 3642, 442, 43240, 83, 5303, 151134, 23, 11907, 195625, 11782, 1957, 140992, 33022, 3444, 47, 70, 98816, 7440, 444, 159029, 959, 20949, 150011, 2685, 1...
[ 0.04241943359375, 0.1993408203125, 0.1463623046875, 0.16650390625, 0.0718994140625, 0.1683349609375, 0.271728515625, 0.1273193359375, 0.2442626953125, 0.06256103515625, 0.09698486328125, 0.060302734375, 0.015289306640625, 0.0279083251953125, 0.1241455078125, 0.04486083984375, 0.02784...
embed
56112352_c1
56112352
prolog
1
|T], [H1|T1]):- translation(H, H1), translate(T,T1). prolist([],[]). prolist(SL,[W|T]):- split(SL,WL,R), name(W,WL), prolist(R,T). split([],[],[]). split([32|T],[],T). split([H|T],[H|T2],R):- split(T,T2,R). run:- nl,write('Enter One sentence or word (English or Malay):'), read(X),end(X), nl. end(X):- X=q->write('SESSIO...
|T], [H1|T1]):- translation(H, H1), translate(T,T1). prolist([],[]). prolist(SL,[W|T]):- split(SL,WL,R), name(W,WL), prolist(R,T). split([],[],[]). split([32|T],[],T). split([H|T],[H|T2],R):- split(T,T2,R). run:- nl,write('Enter One sentence or word (English or Malay):'), read(X),end(X), nl. end(X):- X=q->write('SESSIO...
[ 0.008544921875, -0.006103515625, 0.0084228515625, 0.002532958984375, -0.0186767578125, 0.0076904296875, -0.007537841796875, -0.002105712890625, -0.01214599609375, -0.012451171875, 0.02294921875, 0.0263671875, -0.034912109375, -0.0166015625, -0.0108642578125, 0.01129150390625, 0.04882...
[ 6, 58745, 618, 268, 4, 841, 418, 76172, 2077, 9, 153648, 572, 17727, 3900, 19309, 502, 6562, 194, 30508, 1456, 65450, 181280, 1052, 9351, 6460, 304, 11675, 12, 13169, 18781, 155581, 6561, 149357, 707, 2565, 135832, 16522, 12301, 1542, 361...
[ 0.04791259765625, 0.053955078125, 0.1234130859375, 0.0167236328125, 0.0236663818359375, 0.1141357421875, 0.104248046875, 0.088623046875, 0.0870361328125, 0.010223388671875, 0.2425537109375, 0.080810546875, 0.096923828125, 0.125732421875, 0.169677734375, 0.1455078125, 0.2447509765625,...
embed
71974235_c0
71974235
prolog
0
Title: Prolog road crossing Problem title: Prolog road crossing Tags: artificial-intelligence, prolog Problem: Prolog road crossing How can I implement a solution to this problem in Prolog? There are 3 dogs and 3 cats on the West side of the road. If at any point there are more dogs than cats on one side (except 0 cats...
Prolog road crossing Prolog road crossing artificial-intelligence prolog Prolog Prolog road crossing How can I implement a solution to this problem in Prolog?
[ 0.017578125, 0.0201416015625, -0.003082275390625, -0.015869140625, -0.012939453125, 0.0101318359375, -0.01953125, -0.01275634765625, 0.01226806640625, -0.056884765625, 0.0118408203125, -0.018310546875, -0.023681640625, -0.0023956298828125, -0.0025482177734375, 0.0186767578125, -0.015...
[ 1250, 4867, 33816, 41421, 214, 66733, 9, 130687, 502, 11249, 831, 87, 29479, 10, 29806, 47, 903, 2967, 23, 32 ]
[ 0.1912841796875, 0.279296875, 0.1591796875, 0.2049560546875, 0.10980224609375, 0.1864013671875, 0.01406097412109375, 0.1712646484375, 0.1253662109375, 0.04193115234375, 0.05206298828125, 0.041656494140625, 0.1806640625, 0.03741455078125, 0.16845703125, 0.07135009765625, 0.12939453125...
embed
41035750_c0
41035750
prolog
0
Title: The number of elements with certain value in list Problem title: The number of elements with certain value in list Tags: prolog Problem: The number of elements with certain value in list I am trying to find out how many elements with value X are present in list that is passed as argument in prolog. My code is ce...
The number of elements with certain value in list The number of elements with certain value in list prolog The number of elements with certain value in list I am trying to find out how many elements with value X are present in list that is passed as argument in prolog. My code is Yet it keep returning false. What is wr...
[ -0.0177001953125, 0.00506591796875, 0.0021514892578125, 0.0023651123046875, 0.0037078857421875, 0.0106201171875, -0.00787353515625, -0.00958251953125, 0.011474609375, -0.0390625, -0.01513671875, -0.01080322265625, -0.01007080078125, 0.034912109375, 0.013916015625, -0.018310546875, 0....
[ 581, 14012, 111, 80854, 678, 24233, 34292, 23, 5303, 502, 4867, 31577, 7413, 1810, 3642, 5941, 1193, 621, 13379, 115081, 237, 10750, 18151, 63519, 13695, 30646, 98320, 44691, 195625, 1830, 201505, 313, 5423, 47, 757, 5844, 373, 5125, 12638,...
[ 0.04388427734375, 0.157470703125, 0.038482666015625, 0.219970703125, 0.1385498046875, 0.1846923828125, 0.203857421875, 0.1121826171875, 0.20751953125, 0.1734619140625, 0.22705078125, 0.060516357421875, 0.0738525390625, 0.06402587890625, 0.037750244140625, 0.0927734375, 0.095581054687...
embed
44011598_c0
44011598
prolog
0
Title: Filter list in prolog Problem title: Filter list in prolog Tags: prolog Problem: Filter list in prolog I'm trying to rewrite code from Haskell to Prolog. count :: Eq a => a -> [a] -> Int count x = length . filter (x==) f :: [Integer] -> [Integer] f [] = [] f list = filter (\x -> count x list == 1) list This code...
Filter list in prolog Filter list in prolog prolog Filter Integer Filter list in prolog I'm trying to rewrite code from Haskell to Prolog. This code return list that contains elements that appears only once in the list. So if I have list [1,1,2,2,3,4,4,5] this function returns [3,5] I tried to find filter construction ...
[ 0.003936767578125, 0.007110595703125, -0.00823974609375, -0.006256103515625, -0.01177978515625, -0.004974365234375, 0.004974365234375, 0.017578125, 0.005462646484375, -0.0198974609375, -0.0133056640625, -0.017822265625, 0.002838134765625, 0.01153564453125, 0.00250244140625, 0.003768920...
[ 128896, 5303, 502, 4867, 23, 44401, 31577, 456, 434, 18781, 18151, 20625, 142508, 47, 1250, 30646, 70541, 80854, 135179, 4734, 24145, 765, 133063, 304, 82449, 80389, 32354, 92714, 7413, 46312, 50961, 21373 ]
[ 0.272705078125, 0.1883544921875, 0.14794921875, 0.25927734375, 0.0205078125, 0.17431640625, 0.0160675048828125, 0.0272979736328125, 0.0147857666015625, 0.0462646484375, 0.10595703125, 0.095947265625, 0.20361328125, 0.020660400390625, 0.1546630859375, 0.15087890625, 0.08258056640625, ...
embed
21110919_c0
21110919
prolog
0
Title: Eliminate the maximum element from every sublist of a list in Prolog Problem title: Eliminate the maximum element from every sublist of a list in Prolog Tags: prolog Problem: Eliminate the maximum element from every sublist of a list in Prolog Can anyone help me write a function that eliminates the maximum eleme...
Eliminate the maximum element from every sublist of a list in Prolog Eliminate the maximum element from every sublist of a list in Prolog prolog every Eliminate Prolog Eliminate the maximum element from every sublist of a list in Prolog Can anyone help me write a function that eliminates the maximum element from every ...
[ 0.00144195556640625, 0.01904296875, 0.0189208984375, 0.00909423828125, -0.0078125, 0.033935546875, 0.00830078125, 0.0024261474609375, 0.015380859375, 0.0026092529296875, 0.00958251953125, -0.00848388671875, -0.004119873046875, -0.0096435546875, 0.006805419921875, 0.0020904541015625, ...
[ 203358, 67, 38132, 12830, 1295, 11907, 1614, 6562, 5303, 1250, 4867, 23, 502, 4358, 33022, 32354, 27169, 1636, 111, 25647, 2060, 3714, 154109, 70731, 13, 1326, 68252, 617, 82449, 758, 136555, 155761, 52688 ]
[ 0.206787109375, 0.08563232421875, 0.2470703125, 0.219482421875, 0.1173095703125, 0.1451416015625, 0.21240234375, 0.238037109375, 0.194580078125, 0.1400146484375, 0.221923828125, 0.0266265869140625, 0.1171875, 0.039031982421875, 0.073974609375, 0.171142578125, 0.197265625, 0.1086425...
embed
8711273_c0
8711273
prolog
0
Title: reading terms in Prolog Problem title: reading terms in Prolog Tags: visual-prolog, prolog Problem: reading terms in Prolog I have to do a small program to work with sets like A = {3,5,1,8} . A set like this can be made by the facts: set(a,3) set(a,5) set(a,1) set(a,8) and I've got these domains and this fact: d...
reading terms in Prolog reading terms in Prolog visual-prolog prolog Prolog reading terms in Prolog I have to do a small program to work with sets like A = {3,5,1,8} . A set like this can be made by the facts: and I've got these domains and this fact: Now I have to implement a function that lets the user add new sets, ...
[ 0.0179443359375, 0.01239013671875, 0.01116943359375, 0.017822265625, -0.00408935546875, 0.0150146484375, 0.017333984375, 0.012939453125, -0.0125732421875, -0.046630859375, 0.03125, 0.00074005126953125, -0.0250244140625, -0.0262451171875, 0.01043701171875, 0, 0.00238037109375, 0.012...
[ 16454, 69407, 23, 1250, 4867, 21176, 3454, 502, 19336, 1528, 4488, 5423, 62, 2203, 92714, 179941, 7228, 15824, 77758, 903, 29479, 32354, 2633, 38937, 15190, 3525, 4527, 1653, 2063, 67, 39116, 32166, 12301, 1295, 149186, 110, 6528, 3642, 435...
[ 0.213134765625, 0.2498779296875, 0.050872802734375, 0.157470703125, 0.25927734375, 0.177978515625, 0.079345703125, 0.084716796875, 0.04254150390625, 0.110595703125, 0.054931640625, 0.194580078125, 0.1090087890625, 0.03143310546875, 0.1771240234375, 0.1485595703125, 0.0301971435546875...
embed
9420073_c0
9420073
prolog
0
Title: If statement in prolog Problem title: If statement in prolog Tags: water-jug-problem, prolog Problem: If statement in prolog Hello i have a problem with if statement. i have this final(C1-W1,C2-W2,C3-W3):- retractall(end_jug), asserta( end_jug(C1,W1) ), asserta( end_jug(C2,W2) ), asserta( end_jug(C3,W3) ). and t...
If statement in prolog If statement in prolog water-jug-problem prolog C1-W1 C2-W2 C3-W3 end_jug X-W Congrats If statement in prolog Hello i have a problem with if statement. i have this and this one How can i have this check????: Thanks in advance!!
[ 0.00543212890625, 0.00125885009765625, -0.0014801025390625, 0.01336669921875, -0.00604248046875, 0.00176239013671875, -0.004974365234375, 0.0123291015625, -0.006195068359375, 0.0250244140625, 0.00872802734375, 0.0263671875, 0.0067138671875, 0.005523681640625, 0.0159912109375, -0.004638...
[ 4263, 63805, 23, 502, 4867, 7401, 461, 177, 38953, 313, 20268, 1456, 418, 27495, 363, 3564, 1193, 71867, 35378, 17, 765, 2967, 678, 2174, 903, 1632, 831, 12765, 35042, 22362, 129745, 1146 ]
[ 0.251708984375, 0.271240234375, 0.10040283203125, 0.172119140625, 0.252197265625, 0.184326171875, 0.167724609375, 0.1158447265625, 0.19091796875, 0.024627685546875, 0.01194000244140625, 0.1060791015625, 0.0164947509765625, 0.0390625, 0.061737060546875, 0.06634521484375, 0.05075073242...
embed
22843404_c0
22843404
prolog
0
Title: prefix with append in prolog- how does it work? Problem title: prefix with append in prolog- how does it work? Tags: prolog Problem: prefix with append in prolog- how does it work? how does the following code for prefix in Prolog work? prefix supposed to return the prefix of a list. for example: ?-prefix([1,2,3]...
prefix with append in prolog- how does it work? prefix with append in prolog- how does it work? prolog prefix with append in prolog- how does it work? how does the following code for prefix in Prolog work? prefix supposed to return the prefix of a list. for example: (i am not sure if it should be written as the opposit...
[ 0.0196533203125, 0.005157470703125, 0.01904296875, 0.007110595703125, -0.0079345703125, -0.002685546875, 0.0115966796875, 0.0238037109375, 0.0189208984375, -0.01611328125, 0.0133056640625, -0.018798828125, -0.00031280517578125, -0.0057373046875, 0.005828857421875, 0.0068359375, 0.021...
[ 183114, 678, 114689, 71, 23, 502, 4867, 3642, 14602, 442, 4488, 25632, 18151, 1250, 134598, 30646, 70, 111, 5303, 27781, 59121, 237, 198274, 1542, 155761, 1221, 7068, 17550, 90173, 11675, 15190, 6626, 79315 ]
[ 0.27587890625, 0.107421875, 0.1934814453125, 0.1654052734375, 0.06005859375, 0.1422119140625, 0.2130126953125, 0.0797119140625, 0.01800537109375, 0.0153656005859375, 0.1263427734375, 0.04852294921875, 0.1358642578125, 0.143310546875, 0.0867919921875, 0.1871337890625, 0.0228271484375,...
embed
66328584_c0
66328584
prolog
0
Title: Why `f(a)=a` fails but `f(X)=X` succeeds in prolog? Problem title: Why `f(a)=a` fails but `f(X)=X` succeeds in prolog? Tags: occurs-check, prolog Problem: Why `f(a)=a` fails but `f(X)=X` succeeds in prolog? I came across following: ?- f(X) = X. X = f(X). ?- f(a) = a. false. Why unification works for f(X) = X , b...
Why `f(a)=a` fails but `f(X)=X` succeeds in prolog? Why `f(a)=a` fails but `f(X)=X` succeeds in prolog? occurs-check prolog Why Why `f(a)=a` fails but `f(X)=X` succeeds in prolog? I came across following: Why unification works for f(X) = X , but not for f(a) = a ? Is it because first simply says name return value of f(...
[ 0.01708984375, 0.003143310546875, 0.01953125, -0.0076904296875, -0.00787353515625, -0.0361328125, 0.01177978515625, 0.0026397705078125, 0.009765625, 0.0196533203125, 0.0106201171875, 0.01177978515625, -0.0001544952392578125, 0.005523681640625, 0.007049560546875, -0.0213623046875, 0.0...
[ 44084, 420, 132, 11, 1369, 35782, 1284, 1542, 214493, 502, 4867, 74918, 7, 78292, 23, 51, 41274, 43240, 100, 1238, 2203, 1193, 959, 10, 9351, 30646, 34292, 237, 1927, 12765, 9232, 5983, 23755, 65395, 19, 98 ]
[ 0.1124267578125, 0.15966796875, 0.159423828125, 0.1455078125, 0.124755859375, 0.1922607421875, 0.0711669921875, 0.1834716796875, 0.166748046875, 0.1590576171875, 0.2091064453125, 0.1904296875, 0.03759765625, 0.1695556640625, 0.021575927734375, 0.15380859375, 0.170166015625, 0.09863...
embed
50529329_c0
50529329
prolog
0
Title: Define operator in prolog Problem title: Define operator in prolog Tags: prolog Problem: Define operator in prolog I am doing a lot of prolog exercises to improve my logic skills. But i'm stuck with the request of an exercise. What i have to do is to define an operator i , in a way that: if the user inputs a com...
Define operator in prolog Define operator in prolog prolog Define Define operator in prolog I am doing a lot of prolog exercises to improve my logic skills. But i'm stuck with the request of an exercise. What i have to do is to define an operator i , in a way that: if the user inputs a complex number with this syntax ,...
[ -0.00921630859375, -0.007293701171875, 0.014892578125, 0.025390625, 0.01251220703125, 0.011474609375, 0.0128173828125, 0.040771484375, 0, -0.038818359375, -0.0026397705078125, -0.0233154296875, -0.00531005859375, -0.00457763671875, 0.006683349609375, 0.00016021728515625, 0.0006179809...
[ 262, 64552, 39933, 23, 502, 4867, 5915, 81979, 52295, 62775, 59376, 179933, 50336, 61924, 142, 17, 3917, 2174, 38937, 107730, 27140, 14012, 678, 903, 6002, 86531, 1829, 105876, 4527, 12301, 132, 1542, 2046, 237, 16750, 217064, 1250, 233, 13...
[ 0.0625, 0.2091064453125, 0.307373046875, 0.051025390625, 0.10540771484375, 0.2125244140625, 0.003143310546875, 0.112060546875, 0.031768798828125, 0.069091796875, 0.045867919921875, 0.05462646484375, 0.09454345703125, 0.15625, 0.024993896484375, 0.14794921875, 0.003448486328125, 0.0...
embed
35949923_c1
35949923
prolog
1
- multi_available(X). X = carnitas_taco ; X = combo_plate ; X = combo_plate ; X = carne_asada_burrito ; X = combo_plate ; X = combo_plate ; X = adobado_plate ; X = adobado_plate ; X = adobado_plate ; X = adobado_plate ; X = carnitas_taco ; X = carne_asada_burrito ; X = adobado_plate ; X = adobado_plate ; X = combo_plat...
- multi_available(X). X = carnitas_taco ; X = combo_plate ; X = combo_plate ; X = carne_asada_burrito ; X = combo_plate ; X = combo_plate ; X = adobado_plate ; X = adobado_plate ; X = adobado_plate ; X = adobado_plate ; X = carnitas_taco ; X = carne_asada_burrito ; X = adobado_plate ; X = adobado_plate ; X = combo_plat...
[ -0.022705078125, -0.00701904296875, 0.0128173828125, 0.017822265625, -0.0038604736328125, 0.02783203125, -0.0034027099609375, -0.01129150390625, 0.0322265625, -0.015869140625, -0.00360107421875, -0.0040283203125, 0.029296875, 0.0072021484375, -0.004486083984375, -0.0126953125, -0.005...
[ 20, 6024, 454, 5528, 379, 2886, 132, 1542, 194, 1193, 2203, 2258, 93, 1073, 102, 587, 2819, 375, 837, 92558, 20366, 162, 1090, 5992, 40880, 10, 12706, 1138, 438, 28864, 26073, 12, 210732, 4, 88, 1010, 56, 965, 144, 3166, 1290, 21, 1...
[ 0.0330810546875, 0.250244140625, 0.0684814453125, 0.1824951171875, 0.19482421875, 0.232666015625, 0.05340576171875, 0.202392578125, 0.06268310546875, 0.1748046875, 0.09075927734375, 0.1685791015625, 0.14697265625, 0.228759765625, 0.1702880859375, 0.2265625, 0.09075927734375, 0.1252...
embed
64399962_c0
64399962
prolog
0
Title: Prolog number generation between Number 1 and Number 2 Problem title: Prolog number generation between Number 1 and Number 2 Tags: prolog Problem: Prolog number generation between Number 1 and Number 2 I need to write a prolog program that will give the numbers between N1 and N2 (both are included). I have writt...
Prolog number generation between Number 1 and Number 2 Prolog number generation between Number 1 and Number 2 prolog Prolog Number generate_num in_between Prolog number generation between Number 1 and Number 2 I need to write a prolog program that will give the numbers between N1 and N2 (both are included). I have writ...
[ -0.00811767578125, -0.006256103515625, -0.01214599609375, 0.00830078125, 0.01397705078125, 0.044921875, -0.022216796875, 0.009033203125, 0.005645751953125, -0.02783203125, -0.00159454345703125, -0.0162353515625, -0.01470947265625, 0.0174560546875, 0.015625, -0.0152587890625, 0.011169...
[ 1250, 4867, 14012, 58093, 17721, 103332, 106, 136, 116, 502, 139392, 2606, 23, 4626, 1177, 33, 3871, 33022, 1528, 8337, 101935, 541, 418, 304, 837, 927, 99201, 59121, 68772, 11001, 12830, 99, 140992, 4358 ]
[ 0.1678466796875, 0.2269287109375, 0.1883544921875, 0.1756591796875, 0.147705078125, 0.1383056640625, 0.1160888671875, 0.0628662109375, 0.1815185546875, 0.126220703125, 0.195068359375, 0.18359375, 0.066650390625, 0.050537109375, 0.11767578125, 0.051483154296875, 0.049713134765625, 0...
embed
29461885_c1
29461885
prolog
1
right, B), A>=1, B>=1, A<=Height, B<=Width ), Neighbors). Now the same query, neighbors(5,5,5,5,X). results in me getting the following error: ERROR: Undefined procedure: neighbors/5 ERROR: However, there are definitions for: ERROR: neighbor/2 ERROR: neighbors/2 false. What could be the reason? I imagine it's got to do...
right, B), A>=1, B>=1, A<=Height, B<=Width ), Neighbors). Now the same query, neighbors(5,5,5,5,X). results in me getting the following error: ERROR: Undefined procedure: neighbors/5 ERROR: However, there are definitions for: ERROR: neighbor/2 ERROR: neighbors/2 false. What could be the reason? I imagine it's got to do...
[ 0.00151824951171875, 0.018310546875, 0.00439453125, -0.017333984375, -0.0027008056640625, 0.017333984375, -0.017578125, 0.001129150390625, 0.00183868408203125, -0.0220947265625, -0.005645751953125, -0.0159912109375, -0.0034027099609375, -0.001678466796875, 0.0091552734375, -0.005584716...
[ 7108, 335, 62, 2740, 33000, 13025, 22553, 532, 927, 799, 6958, 3422, 7, 5701, 41, 1294, 208244, 125592, 1542, 50339, 163, 25632, 18499, 151206, 24638, 79912, 5983, 297, 50491, 12147, 33306, 80934, 12477, 98320, 31635, 28987, 37397, 77336, 5...
[ 0.1256103515625, 0.0701904296875, 0.00390625, 0.049713134765625, 0.0283355712890625, 0.033416748046875, 0.1295166015625, 0.00701904296875, 0.0711669921875, 0.03656005859375, 0.175048828125, 0.1876220703125, 0.1253662109375, 0.0157012939453125, 0.12451171875, 0.06207275390625, 0.27026...
embed
34167214_c0
34167214
prolog
0
Title: Prolog - Return the n-th row of a matrix Problem title: Prolog - Return the n-th row of a matrix Tags: list, counter, prolog, matrix Problem: Prolog - Return the n-th row of a matrix I am trying to write the predicate rowN/3 which returns the n -th element (in this case row) of a matrix. Example: ?- rowN([[1,2],...
Prolog - Return the n-th row of a matrix Prolog - Return the n-th row of a matrix list counter prolog matrix Prolog Prolog - Return the n-th row of a matrix I am trying to write the predicate rowN/3 which returns the n -th element (in this case row) of a matrix. Example: I am struggling with the counter. I have tried u...
[ 0.00787353515625, 0.005615234375, 0.0224609375, 0.00909423828125, -0.003753662109375, 0.00051116943359375, 0.0184326171875, 0.0189208984375, 0.00177001953125, -0.0169677734375, 0.01153564453125, -0.0169677734375, -0.0230712890625, 0.0035247802734375, -0.004486083984375, 0.0038757324218...
[ 1250, 4867, 173340, 653, 9, 927, 15555, 111, 50944, 425, 5303, 105416, 502, 31577, 33022, 1653, 2063, 67, 839, 18113, 30646, 20, 12830, 7225, 89536, 237875, 226534, 21373, 27781, 2060, 145755, 903, 28864 ]
[ 0.170654296875, 0.24560546875, 0.2008056640625, 0.1607666015625, 0.072998046875, 0.189208984375, 0.2286376953125, 0.0289306640625, 0.18505859375, 0.086669921875, 0.1351318359375, 0.2142333984375, 0.147216796875, 0.07244873046875, 0.1297607421875, 0.111572265625, 0.15966796875, 0.02...
embed
37620955_c1
37620955
prolog
1
facts without needing recompilation? Well, any scripting language can offer that really. Is it the fact that it can easily evolve as domain knowledge evolves? Well, I believe that domain knowledge doesn't evolve that much for it to be a problem, and when it does, software follows, that is why it has always been. I hon...
facts without needing recompilation? Well, any scripting language can offer that really. Is it the fact that it can easily evolve as domain knowledge evolves? Well, I believe that domain knowledge doesn't evolve that much for it to be a problem, and when it does, software follows, that is why it has always been. I hon...
[ 0.031494140625, 0.016845703125, 0.00909423828125, 0.007110595703125, 0.0162353515625, 0.005950927734375, -0.0123291015625, 0.01019287109375, -0.00787353515625, -0.038818359375, -0.0020294189453125, 0.0169677734375, -0.00286865234375, 0.00171661376953125, -0.01483154296875, -0.000942230...
[ 15824, 7, 15490, 3871, 33844, 11368, 57860, 2499, 26499, 214, 46876, 831, 18645, 450, 6183, 72546, 216479, 237, 77758, 51359, 18822, 5045, 2967, 10975, 28960, 1556, 11343, 2809, 42551, 7941, 1733, 1660, 151138, 4527, 1250, 4867, 4734, 70523, ...
[ 0.1949462890625, 0.10150146484375, 0.087158203125, 0.06646728515625, 0.06036376953125, 0.13671875, 0.0689697265625, 0.04254150390625, 0.154541015625, 0.030181884765625, 0.169189453125, 0.0440673828125, 0.1207275390625, 0.0290985107421875, 0.05902099609375, 0.100341796875, 0.209594726...
embed
8089277_c0
8089277
prolog
0
Title: Trimming off uninitialized list values in prolog Problem title: Trimming off uninitialized list values in prolog Tags: list, prolog, trim Problem: Trimming off uninitialized list values in prolog I'm writing something in prolog and the way I used append, it ends up returning a list like [a,b,c|_]. Is there any s...
Trimming off uninitialized list values in prolog Trimming off uninitialized list values in prolog list prolog trim Trimming Trimming off uninitialized list values in prolog I'm writing something in prolog and the way I used append, it ends up returning a list like [a,b,c|_]. Is there any standard predicate (or simple w...
[ 0.02001953125, 0.0277099609375, 0.015869140625, -0.002685546875, -0.0220947265625, 0.0028076171875, 0.000598907470703125, 0.01214599609375, 0.01611328125, -0.00286865234375, -0.01324462890625, -0.0150146484375, -0.00110626220703125, 0.0233154296875, 0.00164031982421875, -0.015197753906...
[ 4699, 58838, 5773, 51, 943, 118, 289, 29367, 5303, 142424, 502, 4867, 23, 85247, 32562, 114689, 71, 3564, 30646, 1884, 11, 275, 238, 58745, 454, 5570, 1653, 2063, 8781, 3917, 47, 59226, 756, 70, 75555, 22246, 1294, 77554, 927, 4488, 580...
[ 0.193115234375, 0.1015625, 0.18359375, 0.079345703125, 0.03875732421875, 0.0533447265625, 0.047119140625, 0.06573486328125, 0.1668701171875, 0.1680908203125, 0.1522216796875, 0.2127685546875, 0.0202484130859375, 0.208740234375, 0.06646728515625, 0.13671875, 0.112060546875, 0.015380...
embed
26952437_c0
26952437
prolog
0
Title: writing a parser in prolog Problem title: writing a parser in prolog Tags: prolog, dcg, parsing, context-free-grammar Problem: writing a parser in prolog Here is the grammar: <S>-><X><Y><Z> <X>->a<X>|a <Y>->b<Y>|b <Z>->c<Z>|c I need to write a parser in this grammar. and when test S([a,a,b,c,c,c],[]). it should ...
writing a parser in prolog writing a parser in prolog prolog dcg parsing context-free-grammar writing a parser in prolog Here is the grammar: I need to write a parser in this grammar. and when test S([a,a,b,c,c,c],[]). it should return true. in my code I defined match rule to check list elements. what is wrong in this ...
[ 0.00457763671875, 0.01544189453125, 0.002655029296875, 0.016845703125, -0.01806640625, 0.008544921875, -0.00396728515625, 0.002655029296875, 0.00958251953125, -0.007232666015625, 0.01263427734375, -0.001983642578125, -0.01055908203125, -0.01324462890625, 0.0296630859375, 0.0107421875, ...
[ 32562, 366, 2189, 23, 502, 4867, 10, 177, 6953, 43701, 32087, 107415, 147, 122092, 3871, 33022, 903, 3034, 159, 11, 275, 238, 1065, 30646, 29568, 18151, 61924, 14858, 79986, 12765, 5303, 80854, 44691, 8337, 1284, 3229, 144851, 959, 20697 ]
[ 0.1416015625, 0.1748046875, 0.2376708984375, 0.050140380859375, 0.1502685546875, 0.23388671875, 0.0277099609375, 0.076416015625, 0.046234130859375, 0.114990234375, 0.07513427734375, 0.06195068359375, 0.09307861328125, 0.112548828125, 0.05755615234375, 0.114990234375, 0.0150146484375,...
embed
78012673_c1
78012673
prolog
1
33,3,11030793,:(user, on(c, _110)),[])], 'depth': 11030794, 'environments': 11030795, 'globalused': 86196, 'localused': 947959, 'stack_limit': 1048576, 'trailused': 0})'. prolog.asserta() and prolog.assertz() seems to have the same problem.I'm not sure how to address it within the context of PySwip. Thank you in advanc...
33,3,11030793,:(user, on(c, _110)),[])], 'depth': 11030794, 'environments': 11030795, 'globalused': 86196, 'localused': 947959, 'stack_limit': 1048576, 'trailused': 0})'. prolog.asserta() and prolog.assertz() seems to have the same problem.I'm not sure how to address it within the context of PySwip. Thank you in advanc...
[ 0.0294189453125, 0.017333984375, -0.0198974609375, 0.02294921875, -0.019287109375, -0.006103515625, -0.01171875, -0.000946044921875, 0.01025390625, -0.04296875, 0.0181884765625, 0.0028839111328125, -0.006988525390625, 0.0206298828125, 0.03466796875, -0.0079345703125, 0.016845703125, ...
[ 3912, 363, 4, 36053, 1197, 22377, 65918, 98, 238, 168867, 12062, 197697, 153210, 167255, 156566, 33740, 11648, 98908, 590, 2594, 93343, 114999, 1517, 379, 757, 502, 4867, 162, 110965, 132, 136, 33657, 169, 37202, 5701, 2967, 29823, 43701, 2...
[ 0.1541748046875, 0.112548828125, 0.00244140625, 0.1719970703125, 0.04150390625, 0.0843505859375, 0.1495361328125, 0.1824951171875, 0.002471923828125, 0.1575927734375, 0.042266845703125, 0.05419921875, 0.119384765625, 0.0145721435546875, 0.0693359375, 0.1600341796875, 0.01937866210937...
embed
68556002_c0
68556002
prolog
0
Title: How to specify ciao language mode for compilation Problem title: How to specify ciao language mode for compilation Tags: ciao-prolog, prolog Problem: How to specify ciao language mode for compilation I have the following Prolog program: main :- write("Hello"), nl. Running this under ciao (through compilation cia...
How to specify ciao language mode for compilation How to specify ciao language mode for compilation ciao-prolog prolog How Hello How to specify ciao language mode for compilation I have the following Prolog program: Running this under ciao (through compilation ciaoc or in a repl ciaosh ) results in printing the ASCII l...
[ 0.00970458984375, 0.0011749267578125, 0.0093994140625, 0.0322265625, 0.00109100341796875, -0.0047607421875, -0.00482177734375, 0.0301513671875, 0.00445556640625, -0.030029296875, -0.00011730194091796875, -0.037109375, -0.01220703125, -0.00946044921875, 0.017822265625, -0.0125732421875,...
[ 11249, 40140, 18929, 1883, 31, 46876, 13736, 100, 98352, 3454, 4867, 502, 35378, 1250, 1528, 28398, 1379, 6652, 2424, 32067, 50339, 2448, 125429, 10001, 5303, 18811, 903, 79315, 43240, 84751, 51042, 128019, 6868, 183234 ]
[ 0.042236328125, 0.154296875, 0.08837890625, 0.2020263671875, 0.1966552734375, 0.17578125, 0.1865234375, 0.038116455078125, 0.1943359375, 0.0931396484375, 0.1854248046875, 0.097900390625, 0.09014892578125, 0.119140625, 0.09515380859375, 0.0479736328125, 0.0728759765625, 0.1788330078...
embed
47970796_c0
47970796
prolog
0
Title: I want to replace list into elements of list Problem title: I want to replace list into elements of list Tags: list, prolog, replace Problem: I want to replace list into elements of list item_replacement_item_mapped(E, Es, E, Es). item_replacement_item_mapped(X, _, E, [E]) :- dif(X, E). repl(Es0,X,Xs,Es) :- mapl...
I want to replace list into elements of list I want to replace list into elements of list list prolog replace item_replacement_item_mapped Es0 Ess1 I want to replace list into elements of list Example I have list [a,b,c,d,b,c,e,f] and I want to replace list [x,y,z] into [b,c] . Final results would be [a,x,y,z,d,x,y,z,e...
[ -0.0235595703125, -0.00689697265625, 0.00531005859375, 0.0098876953125, -0.0198974609375, 0.007659912109375, -0.007415771484375, -0.0036773681640625, 0.0159912109375, 0.00518798828125, 0.03173828125, 0.0142822265625, -0.0050048828125, 0.00958251953125, 0.006683349609375, -0.00622558593...
[ 87, 3444, 47, 91995, 5303, 3934, 80854, 111, 502, 4867, 35735, 107, 23935, 674, 217, 195, 192, 48398, 1184, 2389, 7, 418, 89536, 11, 275, 238, 71, 420, 425, 53, 169, 27188, 50339, 2806, 186, 11249, 33022, 1653, 2063, 67, 23, 1250 ]
[ 0.03277587890625, 0.125, 0.07598876953125, 0.2093505859375, 0.2386474609375, 0.170166015625, 0.1893310546875, 0.1153564453125, 0.1458740234375, 0.2452392578125, 0.170166015625, 0.09918212890625, 0.1710205078125, 0.060546875, 0.0694580078125, 0.09375, 0.1370849609375, 0.086730957031...
embed
58054943_c0
58054943
prolog
0
Title: Wrap every element from a list Problem title: Wrap every element from a list Tags: prolog, maplist Problem: Wrap every element from a list How do you wrap every element from a list? I have something like this (2*3*4*...)^6 How do I make a list with this output: 2^6 * 3^6 * 4^6 * ... I was thinking on something s...
Wrap every element from a list Wrap every element from a list prolog maplist a Wrap Args Args2 Wrap every element from a list How do you wrap every element from a list? I have something like this (2*3*4*...)^6 How do I make a list with this output: 2^6 * 3^6 * 4^6 * ... I was thinking on something simple using maplist ...
[ 0.00125885009765625, -0.00933837890625, -0.000904083251953125, 0.00078582763671875, -0.01214599609375, 0.0228271484375, -0.00099945068359375, -0.0007476806640625, 0.0198974609375, -0.00775146484375, 0.009765625, 0.002960205078125, -0.0140380859375, 0.00830078125, 0.0006561279296875, 0....
[ 601, 13631, 11907, 12830, 1295, 10, 5303, 502, 4867, 22288, 6562, 1172, 9405, 304, 11249, 54, 398, 137565, 765, 9844, 1884, 903, 4700, 1639, 363, 617, 910, 3249, 678, 140992, 116, 8353, 661, 138, 201, 47644, 8781, 17368, 9077, 25379, 17...
[ 0.0406494140625, 0.266845703125, 0.204345703125, 0.2283935546875, 0.156494140625, 0.036529541015625, 0.26318359375, 0.1124267578125, 0.174072265625, 0.1103515625, 0.2020263671875, 0.1427001953125, 0.1280517578125, 0.10699462890625, 0.023773193359375, 0.048736572265625, 0.019439697265...
embed
72696287_c0
72696287
prolog
0
Title: Simple recursive prolog program to add elements Problem title: Simple recursive prolog program to add elements Tags: prolog Problem: Simple recursive prolog program to add elements I am trying to calculate the sum of values given. My attempt: element(0, 988). element(1, 5434). element(2, 5433). element(3, 4543)....
Simple recursive prolog program to add elements Simple recursive prolog program to add elements prolog given Simple INDEX SUM VALUE SUM-VALUE Simple recursive prolog program to add elements I am trying to calculate the sum of values given. My attempt: My query: This is not working. Is it a syntactic error?
[ -0.0031280517578125, 0.0150146484375, -0.0208740234375, 0.006683349609375, -0.03955078125, 0.01953125, -0.00162506103515625, 0.0078125, 0.023681640625, -0.041015625, 0.02880859375, -0.025146484375, -0.037109375, 0.00193023681640625, 0.033447265625, -0.01458740234375, 0.0220947265625,...
[ 60552, 195625, 5844, 502, 4867, 1528, 15190, 80854, 34475, 51383, 26939, 127944, 55991, 37066, 61152, 47, 31577, 74481, 10554, 111, 142424, 81887, 41, 959, 20697, 6002, 102, 49086, 18499 ]
[ 0.1458740234375, 0.142578125, 0.0992431640625, 0.11572265625, 0.21240234375, 0.1800537109375, 0.158935546875, 0.2021484375, 0.09454345703125, 0.0849609375, 0.1138916015625, 0.1953125, 0.102783203125, 0.02880859375, 0.115478515625, 0.00027298927307128906, 0.03656005859375, 0.1418457...
embed
30412017_c0
30412017
prolog
0
Title: An efficient match_chk/2 predicate in Prolog Problem title: An efficient match_chk/2 predicate in Prolog Tags: matching, prolog Problem: An efficient match_chk/2 predicate in Prolog I want to check two terms if they are matchable by =/2 , and during the checking no variable should be bound. For example: match_ch...
An efficient match_chk/2 predicate in Prolog An efficient match_chk/2 predicate in Prolog matching prolog match_chk Prolog subsumes_term An efficient match_chk/2 predicate in Prolog I want to check two terms if they are matchable by =/2 , and during the checking no variable should be bound. For example: match_chk/2 Thi...
[ -0.005126953125, 0.01458740234375, 0.0133056640625, 0.0123291015625, -0.01226806640625, -0.002288818359375, -0.028564453125, 0.01300048828125, -0.0078125, -0.0157470703125, 0.0281982421875, -0.002532958984375, 0.006072998046875, -0.00060272216796875, 0.0194091796875, -0.001022338867187...
[ 93766, 14858, 206, 92, 12477, 1653, 2063, 67, 1250, 4867, 502, 1614, 11832, 32166, 3444, 12765, 6626, 69407, 2174, 2886, 2203, 175199, 110, 77336, 5608, 99091, 230612, 186351, 24500, 44954, 116, 20028 ]
[ 0.1553955078125, 0.2109375, 0.104248046875, 0.116943359375, 0.210205078125, 0.1390380859375, 0.1695556640625, 0.0408935546875, 0.132568359375, 0.215087890625, 0.08447265625, 0.111328125, 0.150146484375, 0.1387939453125, 0.003753662109375, 0.1937255859375, 0.0894775390625, 0.2042236...
embed
54540658_c0
54540658
prolog
0
Title: Prolog - Change elements of a list Problem title: Prolog - Change elements of a list Tags: list, prolog Problem: Prolog - Change elements of a list Complete beginner doing exercises from a book, I want take a list X and change its elements so that for some [H|X] the new list Y would have the HEAD element be (H-1...
Prolog - Change elements of a list Prolog - Change elements of a list list prolog Prolog Change HEAD H-1 Prolog - Change elements of a list Complete beginner doing exercises from a book, I want take a list X and change its elements so that for some [H|X] the new list Y would have the HEAD element be (H-1,H+1) . Somethi...
[ -0.01226806640625, 0.00014781951904296875, 0.006195068359375, 0.0135498046875, -0.00531005859375, 0.0107421875, -0.021484375, 0.003997802734375, 0.0220947265625, 0.0037384033203125, 0.015380859375, 0.01129150390625, -0.02197265625, 0.004241943359375, 0.0225830078125, -0.001502990722656...
[ 1250, 4867, 87377, 80854, 111, 5303, 502, 572, 188328, 5759, 20, 168318, 9842, 1679, 81979, 7, 1295, 12877, 3444, 5646, 1193, 15549, 221, 841, 58745, 1542, 3525, 990, 2806, 765, 12830, 186, 21748, 6, 1884, 4865, 2060, 15190, 5117, 30646, ...
[ 0.16552734375, 0.2408447265625, 0.223388671875, 0.2034912109375, 0.052093505859375, 0.2017822265625, 0.1217041015625, 0.1435546875, 0.2296142578125, 0.147216796875, 0.007080078125, 0.07586669921875, 0.058563232421875, 0.08544921875, 0.118896484375, 0.03131103515625, 0.013885498046875...
embed
38283454_c0
38283454
prolog
0
Title: Querying from the terminal doesn&#x27;t print anything Problem title: Querying from the terminal doesn&#x27;t print anything Tags: swi-prolog, command-line, prolog Problem: Querying from the terminal doesn't print anything When ran in the command line, this swipl -g "write(42)" -t "halt" prints 42 to STDOUT as e...
Querying from the terminal doesn&#x27;t print anything Querying from the terminal doesn&#x27;t print anything swi-prolog command-line prolog the Querying STDOUT Querying from the terminal doesn't print anything When ran in the command line, this prints 42 to STDOUT as expected. However, this does not print anything, it...
[ 0.01263427734375, 0.039794921875, -0.0089111328125, 0.007232666015625, -0.00885009765625, -0.00897216796875, 0.01190185546875, 0.000568389892578125, -0.0137939453125, -0.018310546875, -0.003387451171875, 0.0000476837158203125, -0.0107421875, 0.0089111328125, 0, 0.0177001953125, 0.029...
[ 58836, 38543, 1295, 33949, 22027, 3768, 18, 28412, 23937, 91, 2452, 3454, 4867, 75101, 2256, 502, 16992, 397, 52001, 70, 13028, 23, 13315, 903, 4828, 47, 84751, 14602, 959, 42856, 30646, 11249, 2046, 2367, 442, 9069, 21130, 1193, 2203, 37...
[ 0.18798828125, 0.129638671875, 0.1500244140625, 0.2476806640625, 0.08111572265625, 0.03863525390625, 0.08782958984375, 0.199462890625, 0.108154296875, 0.0247955322265625, 0.19482421875, 0.1275634765625, 0.1900634765625, 0.1168212890625, 0.054779052734375, 0.1212158203125, 0.144409179...
embed
69206712_c0
69206712
prolog
0
Title: Draw stars Prolog up to N: draws one line too less Problem title: Draw stars Prolog up to N: draws one line too less Tags: prolog Problem: Draw stars Prolog up to N: draws one line too less The predicate draw/2 with argument N and M should draw up to M stars and should increase N until N > 5. Example: draw(3,5) ...
Draw stars Prolog up to N: draws one line too less Draw stars Prolog up to N: draws one line too less prolog Draw Prolog Symbol Line Draw stars Prolog up to N: draws one line too less The predicate draw/2 with argument N and M should draw up to M stars and should increase N until N > 5. Example: draw(3,5) => My problem...
[ -0.005828857421875, 0.004791259765625, 0.01104736328125, -0.00946044921875, -0.003570556640625, 0.00958251953125, 0.0167236328125, 0.0218505859375, 0.0113525390625, 0.0194091796875, 0.00035858154296875, -0.017333984375, 0.004730224609375, 0.032470703125, 0.00180816650390625, 0.00604248...
[ 18186, 434, 6057, 1250, 4867, 1257, 47, 541, 123840, 1632, 13315, 5792, 40715, 502, 131899, 16777, 1653, 2063, 67, 79442, 12477, 10750, 136, 276, 5608, 51312, 24189, 977, 1892, 92714, 2967, 18151, 4734, 22759, 44084, 53383, 418, 16093, 3543...
[ 0.112548828125, 0.0782470703125, 0.2113037109375, 0.14111328125, 0.2203369140625, 0.07537841796875, 0.0460205078125, 0.124755859375, 0.11083984375, 0.06231689453125, 0.146728515625, 0.10125732421875, 0.19140625, 0.0810546875, 0.1558837890625, 0.1175537109375, 0.10888671875, 0.13891...
embed
2435237_c0
2435237
prolog
0
Title: Prolog - ASSERT and RETRACT Problem title: Prolog - ASSERT and RETRACT Tags: prolog, prolog-assert Problem: Prolog - ASSERT and RETRACT I was wondering, I am aware you can use assert to add facts or rules or whatever if you have declared the predicate to be -:dynamic , but this only allows the changes that are m...
Prolog - ASSERT and RETRACT Prolog - ASSERT and RETRACT prolog prolog-assert Prolog ASSERT RETRACT Prolog - ASSERT and RETRACT I was wondering, I am aware you can use assert to add facts or rules or whatever if you have declared the predicate to be -:dynamic , but this only allows the changes that are made to be kept i...
[ 0.0277099609375, 0.01177978515625, 0.020751953125, 0.019287109375, -0.0111083984375, 0.01129150390625, -0.021484375, 0.00885009765625, 0.00872802734375, -0.01141357421875, 0.004913330078125, 0.0128173828125, -0.025634765625, 0.01080322265625, 0.021484375, 0.0002651214599609375, 0.024...
[ 1250, 4867, 70877, 56263, 136, 9069, 37082, 43379, 502, 162, 33657, 149016, 107419, 831, 4527, 237, 47, 15190, 15824, 707, 91736, 159978, 1653, 2063, 186, 20, 12, 242554, 114864, 65572, 93544, 450, 56002, 4734, 20903, 76896, 63399, 72856, 3...
[ 0.1982421875, 0.28076171875, 0.126708984375, 0.243408203125, 0.131591796875, 0.1024169921875, 0.197509765625, 0.076416015625, 0.1278076171875, 0.0457763671875, 0.285888671875, 0.028289794921875, 0.0174407958984375, 0.045745849609375, 0.109375, 0.129638671875, 0.0305633544921875, 0....
embed
65267091_c0
65267091
prolog
0
Title: How to call a predicate that appends two lists in Prolog? Problem title: How to call a predicate that appends two lists in Prolog? Tags: prolog, predicate, list, call, append Problem: How to call a predicate that appends two lists in Prolog? Everywhere I look I see something like this: append([1,2,3],[a,b,c],app...
How to call a predicate that appends two lists in Prolog? How to call a predicate that appends two lists in Prolog? prolog predicate list call append How Prolog How to call a predicate that appends two lists in Prolog? Everywhere I look I see something like this: append([1,2,3],[a,b,c],appended). , but what if I have 2...
[ -0.00007581710815429688, 0.021240234375, 0.01239013671875, 0.032470703125, -0.0003814697265625, 0.029296875, 0.0169677734375, 0.01177978515625, 0.01312255859375, -0.02734375, 0.002288818359375, -0.0223388671875, -0.0291748046875, -0.00836181640625, 0.020751953125, -0.0115966796875, 0...
[ 11249, 47, 11782, 1653, 2063, 67, 114689, 6468, 6626, 5303, 7, 23, 1250, 4867, 502, 71, 450, 1957, 133063, 96386, 9007, 2285, 116, 3664, 33600, 3444, 136, 31, 25842, 44084, 685, 13817, 959, 4488, 10644, 12830, 21771, 61924 ]
[ 0.09381103515625, 0.0186920166015625, 0.18115234375, 0.1837158203125, 0.22021484375, 0.129638671875, 0.19970703125, 0.0811767578125, 0.193115234375, 0.2449951171875, 0.05621337890625, 0.04864501953125, 0.1732177734375, 0.2509765625, 0.1197509765625, 0.12255859375, 0.009857177734375, ...
embed
26252336_c0
26252336
prolog
0
Title: Generalized solver for crossword puzzle in Prolog Problem title: Generalized solver for crossword puzzle in Prolog Tags: prolog, crossword Problem: Generalized solver for crossword puzzle in Prolog Here is the problem and a specialized version of solution. Learning Prolog: solving a crossword scheme What I am lo...
Generalized solver for crossword puzzle in Prolog Generalized solver for crossword puzzle in Prolog prolog crossword Generalized Prolog Generalized solver for crossword puzzle in Prolog Here is the problem and a specialized version of solution. Learning Prolog: solving a crossword scheme What I am looking for is a gene...
[ 0.003509521484375, 0.0137939453125, -0.0032806396484375, -0.002288818359375, -0.01007080078125, 0.00970458984375, -0.0250244140625, 0.001617431640625, -0.01068115234375, -0.03759765625, 0.00970458984375, -0.0140380859375, -0.0022430419921875, -0.0087890625, -0.00836181640625, 0.0209960...
[ 9082, 29367, 3115, 814, 100, 41421, 47416, 104192, 23, 1250, 4867, 502, 2967, 29806, 114344, 6496, 150370, 16487, 10, 4537, 5701, 3299, 3871, 139392, 77336, 123055, 12403, 3714, 17368, 2452, 3454, 87709, 541, 390, 86725, 1653, 5983 ]
[ 0.1519775390625, 0.1693115234375, 0.1475830078125, 0.20654296875, 0.037384033203125, 0.09564208984375, 0.159912109375, 0.151611328125, 0.054290771484375, 0.15673828125, 0.23974609375, 0.103759765625, 0.039825439453125, 0.03424072265625, 0.052520751953125, 0.061248779296875, 0.1074218...
embed
47624393_c1
47624393
prolog
1
what happens instead is that Prolog treats what has been typed in as an unrecognized entry and produces the fourth outcome; 'Solution not found'. I have repetitively analyzed my code time and again and have been unable to diagnose precisely what has caused the program to not recognize my input. I am not 100% sure what...
what happens instead is that Prolog treats what has been typed in as an unrecognized entry and produces the fourth outcome; 'Solution not found'. I have repetitively analyzed my code time and again and have been unable to diagnose precisely what has caused the program to not recognize my input. I am not 100% sure what...
[ -0.00469970703125, 0.01275634765625, 0.0184326171875, 0.00604248046875, -0.0079345703125, 0.01507568359375, -0.00701904296875, 0.01141357421875, 0.00811767578125, 0.000904083251953125, -0.0004291534423828125, 0.006134033203125, -0.000492095947265625, 0.0093994140625, 0.0030517578125, -...
[ 2367, 96276, 64457, 1250, 4867, 85689, 1556, 2809, 10644, 23, 237, 115558, 64807, 42805, 27489, 22759, 927, 184345, 102588, 34, 1363, 959, 14037, 57346, 7968, 18151, 2886, 99219, 143434, 1528, 125296, 107730, 74955, 44691, 121742, 193857, 1884,...
[ 0.025970458984375, 0.13232421875, 0.1165771484375, 0.18359375, 0.273193359375, 0.0849609375, 0.0274200439453125, 0.022186279296875, 0.152587890625, 0.1231689453125, 0.002044677734375, 0.1212158203125, 0.07080078125, 0.1671142578125, 0.057281494140625, 0.1680908203125, 0.0936279296875...
embed
20407430_c0
20407430
prolog
0
Title: Prolog - how to do setof that returns empty list instead of failing Problem title: Prolog - how to do setof that returns empty list instead of failing Tags: prolog, prolog-setof Problem: Prolog - how to do setof that returns empty list instead of failing I need an ordered list of Objects that satisfy Goal. setof...
Prolog - how to do setof that returns empty list instead of failing Prolog - how to do setof that returns empty list instead of failing prolog prolog-setof Prolog Object Goal List Prolog - how to do setof that returns empty list instead of failing I need an ordered list of Objects that satisfy Goal. setof takes care of...
[ 0.028076171875, -0.0034942626953125, 0.032958984375, -0.003021240234375, -0.008544921875, 0.00160980224609375, -0.0189208984375, -0.01336669921875, 0.009765625, -0.00244140625, 0.002716064453125, -0.004302978515625, -0.01336669921875, -0.02734375, 0.0019378662109375, 0.006378173828125,...
[ 1250, 4867, 3642, 54, 5423, 4390, 450, 30646, 201505, 5303, 64457, 35782, 214, 502, 3509, 134549, 2016, 289, 32036, 7, 3871, 12989, 40407, 53, 51776, 517, 1284, 3229, 110, 3444, 7413, 5584, 43240, 163846, 15490, 59226, 38969, 10752 ]
[ 0.1278076171875, 0.20361328125, 0.0399169921875, 0.06536865234375, 0.163818359375, 0.24658203125, 0.0207672119140625, 0.1728515625, 0.186767578125, 0.1854248046875, 0.1300048828125, 0.16943359375, 0.053314208984375, 0.1055908203125, 0.116455078125, 0.1690673828125, 0.123779296875, ...
embed
9855246_c0
9855246
prolog
0
Title: Divide List to pieces of needed length Problem title: Divide List to pieces of needed length Tags: dcg, prolog Problem: Divide List to pieces of needed length I was trying to write predicate divide(L,Len,Slist) which will be true when Slist can unify with a List of length Len allocated from List L. for example d...
Divide List to pieces of needed length Divide List to pieces of needed length dcg prolog Divide List Len Slist Divide List to pieces of needed length I was trying to write predicate divide(L,Len,Slist) which will be true when Slist can unify with a List of length Len allocated from List L. for example Should give such ...
[ 0.003570556640625, 0.01239013671875, 0.017578125, 0.0089111328125, -0.0262451171875, -0.0162353515625, -0.00970458984375, 0.01165771484375, 0.02001953125, -0.0025634765625, -0.00104522705078125, 0.01214599609375, 0.012451171875, 0.01556396484375, -0.005035400390625, 0.01397705078125, ...
[ 76278, 112, 32036, 47, 126371, 111, 44841, 140909, 104, 238, 177, 502, 4867, 18226, 159, 6562, 31577, 33022, 1653, 2063, 67, 101637, 866, 33, 294, 29568, 831, 51, 40383, 678, 144, 116292, 297, 1295, 339, 151117, 35166, 11522, 3917, 1542, ...
[ 0.191162109375, 0.1202392578125, 0.267333984375, 0.1522216796875, 0.19384765625, 0.0518798828125, 0.2205810546875, 0.1878662109375, 0.0212249755859375, 0.03900146484375, 0.1248779296875, 0.127197265625, 0.169189453125, 0.1837158203125, 0.09954833984375, 0.286376953125, 0.04638671875,...
embed
10377866_c0
10377866
prolog
0
Title: PROLOG -- logic base of entries to LIST of entries Problem title: PROLOG -- logic base of entries to LIST of entries Tags: prolog Problem: PROLOG -- logic base of entries to LIST of entries In PROLOG I have a logic base of entries (which are stored in memory) which I have to convert to a list of entries. example...
PROLOG -- logic base of entries to LIST of entries PROLOG -- logic base of entries to LIST of entries prolog PROLOG LIST _h209 _h212 _h211 PROLOG -- logic base of entries to LIST of entries In PROLOG I have a logic base of entries (which are stored in memory) which I have to convert to a list of entries. example: TO Ca...
[ 0.037841796875, -0.00799560546875, 0.0081787109375, 0.0084228515625, -0.019287109375, 0.0247802734375, -0.031005859375, 0.0311279296875, 0.01348876953125, -0.042236328125, 0.0048828125, 0.00167083740234375, 0.00007581710815429688, 0.00958251953125, 0.01251220703125, 0.0240478515625, ...
[ 10514, 47510, 4210, 62775, 3647, 111, 112820, 90, 47, 195977, 502, 4867, 1549, 1126, 304, 1530, 1662, 765, 4343, 98323, 96760, 5303, 27781, 9926, 4171, 35672, 22936, 3714, 3642, 831, 2046, 442 ]
[ 0.2100830078125, 0.300048828125, 0.042816162109375, 0.21875, 0.262451171875, 0.1236572265625, 0.210693359375, 0.0789794921875, 0.11767578125, 0.2420654296875, 0.1690673828125, 0.253173828125, 0.01263427734375, 0.090087890625, 0.03741455078125, 0.048187255859375, 0.0865478515625, 0....
embed
41700196_c0
41700196
prolog
0
Title: How to write predicate convert/2 in prolog? Problem title: How to write predicate convert/2 in prolog? Tags: prolog Problem: How to write predicate convert/2 in prolog? I want to write a predicate convert/2. It should work like this ? - convert([a,[a,a],[a,b],[b,a],[[a,b]],[d],c],X). X = [a,c,[a],[d],[a,b],[[a,b...
How to write predicate convert/2 in prolog? How to write predicate convert/2 in prolog? prolog How How to write predicate convert/2 in prolog? I want to write a predicate convert/2. It should work like this I know ,that i have to find length of list first. Then i have to sort it and finally i have to merge duplicating ...
[ -0.01043701171875, 0.01361083984375, 0.00872802734375, 0.000720977783203125, -0.0244140625, 0.0294189453125, -0.0142822265625, 0.01446533203125, 0.0111083984375, -0.01019287109375, -0.003997802734375, 0.0198974609375, -0.00518798828125, -0.0133056640625, 0.00604248046875, -0.0128784179...
[ 11249, 47, 33022, 1653, 2063, 67, 96760, 12477, 23, 502, 4867, 3444, 4488, 1884, 7413, 140909, 5303, 5117, 12096, 42564, 171763, 80854 ]
[ 0.083251953125, 0.075439453125, 0.168212890625, 0.1455078125, 0.1978759765625, 0.1173095703125, 0.22021484375, 0.2227783203125, 0.046356201171875, 0.133056640625, 0.2010498046875, 0.037689208984375, 0.013397216796875, 0.00140380859375, 0.0413818359375, 0.0902099609375, 0.107238769531...
embed
48798829_c0
48798829
prolog
0
Title: Trying to understand lists in recursive ways step by step Problem title: Trying to understand lists in recursive ways step by step Tags: prolog Problem: Trying to understand lists in recursive ways step by step concatenar([], Xs, Xs). concatenar([X|Xs],Ys,[X|Zs]) :- concatenar(Xs,Ys,Zs). ?- concatenar([a, d, c],...
Trying to understand lists in recursive ways step by step Trying to understand lists in recursive ways step by step prolog Trying Ejemplo Trying to understand lists in recursive ways step by step
[ 0.01611328125, 0.0018463134765625, -0.003326416015625, 0.01953125, -0.003387451171875, 0.00634765625, 0.0181884765625, 0.01068115234375, 0.02099609375, -0.013671875, -0.0019378662109375, -0.0301513671875, -0.0078125, 0.01129150390625, 0.0191650390625, 0.00099945068359375, 0.017089843...
[ 40858, 214, 28219, 5303, 7, 195625, 5844, 48322, 29954, 390, 47, 502, 4867, 170, 109308 ]
[ 0.1197509765625, 0.04833984375, 0.1851806640625, 0.19873046875, 0.04656982421875, 0.1783447265625, 0.07366943359375, 0.050079345703125, 0.09197998046875, 0.038299560546875, 0.017242431640625, 0.150146484375, 0.1986083984375, 0.03857421875, 0.1229248046875 ]
embed
27708649_c0
27708649
prolog
0
Title: Repeat a rule with a new line of my knowledge base Problem title: Repeat a rule with a new line of my knowledge base Tags: prolog Problem: Repeat a rule with a new line of my knowledge base I am having a problem, I have the following line of code: aux(O,LD,LF):- line(Id,LE), aux(O,LD,Id,1,LE,_,[],LAF), LF = (LAF...
Repeat a rule with a new line of my knowledge base Repeat a rule with a new line of my knowledge base prolog Repeat LAF Repeat a rule with a new line of my knowledge base I am having a problem, I have the following line of code: I want that if LAF is an empty list, to get my next fact of my knowledge base. I tried this...
[ 0.010498046875, -0.0240478515625, 0.00811767578125, 0.027587890625, -0.002838134765625, 0.01190185546875, 0.01513671875, 0.0137939453125, 0.01409912109375, 0.0008087158203125, -0.005645751953125, 0.0028839111328125, -0.01507568359375, -0.019775390625, 0.01080322265625, 0.00066757202148...
[ 33742, 13, 257, 79986, 678, 3525, 13315, 111, 759, 51359, 3647, 502, 4867, 3358, 919, 10, 2967, 25632, 18151, 3444, 2174, 83, 201505, 5303, 2046, 11737, 15824, 37842, 174548, 35431, 98320, 119140, 214, 9433 ]
[ 0.1475830078125, 0.1834716796875, 0.0867919921875, 0.1689453125, 0.083984375, 0.0946044921875, 0.1343994140625, 0.046417236328125, 0.038909912109375, 0.1278076171875, 0.1884765625, 0.0980224609375, 0.16748046875, 0.138427734375, 0.2125244140625, 0.000946044921875, 0.0526123046875, ...
embed
61802235_c0
61802235
prolog
0
Title: Mutating elements of a list in Prolog Problem title: Mutating elements of a list in Prolog Tags: prolog, list, random Problem: Mutating elements of a list in Prolog I am supposed to write a rule in SWI Prolog, which takes a list of characters as input and then replaces each letter by a random other character wit...
Mutating elements of a list in Prolog Mutating elements of a list in Prolog prolog list random Mutating Prolog MutatedList Mutating elements of a list in Prolog I am supposed to write a rule in SWI Prolog, which takes a list of characters as input and then replaces each letter by a random other character with a probabi...
[ 0.00921630859375, -0.004241943359375, 0.01214599609375, 0.00775146484375, 0.00787353515625, 0.0174560546875, -0.0111083984375, 0.003387451171875, 0.00157928466796875, -0.01544189453125, 0.01519775390625, 0.01123046875, -0.007568359375, 0.0034637451171875, 0.003662109375, 0.005035400390...
[ 118756, 1916, 80854, 5303, 23, 1250, 4867, 111, 502, 96759, 3674, 154663, 134598, 33022, 79986, 159, 38969, 51776, 124850, 237, 107730, 91995, 12638, 31330, 3789, 62816, 37242, 757, 18065, 89536, 4171, 14192, 3642, 5809, 29479, 112668, 29786, ...
[ 0.2215576171875, 0.1185302734375, 0.1878662109375, 0.2010498046875, 0.07763671875, 0.1561279296875, 0.225830078125, 0.037841796875, 0.11474609375, 0.1881103515625, 0.0977783203125, 0.19189453125, 0.0667724609375, 0.0733642578125, 0.169921875, 0.020111083984375, 0.1429443359375, 0.0...
embed
19736439_c0
19736439
prolog
0
Title: Delete character from string in Prolog Problem title: Delete character from string in Prolog Tags: prolog Problem: Delete character from string in Prolog I need to remove a character from a string. For example: ?- remove_char('abcde', 'c', X). X = 'abde' ?- remove_char('abcdefgh', 'f', X). X = 'abcdegh' I'm look...
Delete character from string in Prolog Delete character from string in Prolog prolog string Delete Prolog remove_char Delete character from string in Prolog I need to remove a character from a string. For example: I'm looking for a concise way of accomplishing this, but I have no success. I'm new to Prolog and I'm havi...
[ 0.0159912109375, 0.0233154296875, 0.01513671875, 0.0196533203125, -0.0218505859375, 0.01190185546875, 0.0022125244140625, -0.015869140625, 0.00762939453125, -0.0098876953125, 0.0123291015625, -0.0167236328125, -0.02685546875, 0.0152587890625, -0.001495361328125, 0.0093994140625, 0.00...
[ 262, 46485, 62816, 1295, 79315, 23, 1250, 4867, 502, 87388, 9254, 3871, 163846, 110, 36272, 7941, 1733, 184017, 96760, 5303, 88303, 32354 ]
[ 0.1175537109375, 0.179443359375, 0.2437744140625, 0.1070556640625, 0.2476806640625, 0.0516357421875, 0.15087890625, 0.2254638671875, 0.0877685546875, 0.150146484375, 0.192626953125, 0.057098388671875, 0.0037841796875, 0.000457763671875, 0.021453857421875, 0.03253173828125, 0.02502441...
embed
5125516_c0
5125516
prolog
0
Title: Query regarding Concatenation Problem title: Query regarding Concatenation Tags: prolog Problem: Query regarding Concatenation I know that we can concat atoms using atom_concat(Para1,Para1,Final). , Is there any function available in Prolog which can perform the reverse operation mean it takes input as an atom a...
Query regarding Concatenation Query regarding Concatenation prolog Query Concatenation atom_concat Para1 Final rev_atom_concat Para2 Query regarding Concatenation I know that we can concat atoms using atom_concat(Para1,Para1,Final). , Is there any function available in Prolog which can perform the reverse operation mea...
[ 0.01104736328125, 0.01544189453125, 0.0052490234375, 0.0306396484375, -0.01080322265625, 0.0031890869140625, 0.01708984375, 0.01153564453125, -0.0179443359375, -0.0247802734375, 0.00970458984375, -0.013671875, 0.0076904296875, -0.01251220703125, 0.0028533935546875, -0.00775146484375, ...
[ 58836, 53, 118861, 1657, 4460, 33, 2320, 502, 4867, 34627, 2271, 1720, 418, 27188, 37868, 5928, 304, 3714, 831, 158, 7, 17368, 454, 55292, 6159, 6236, 2499, 32354, 19882, 23, 1250, 51339, 39531, 184, 41018, 29459, 51776, 107730, 237, 8734...
[ 0.100341796875, 0.03997802734375, 0.04791259765625, 0.1334228515625, 0.274169921875, 0.150390625, 0.06170654296875, 0.08941650390625, 0.21826171875, 0.2091064453125, 0.13623046875, 0.1531982421875, 0.0738525390625, 0.1689453125, 0.165771484375, 0.1455078125, 0.1385498046875, 0.0488...
embed
27391996_c0
27391996
prolog
0
Title: Union of two variable sets Problem title: Union of two variable sets Tags: prolog, iso-prolog Problem: Union of two variable sets Given two lists of variables, what is the most compact and canonical way in ISO Prolog to determine the union of both? That is, we want a definition for the (meta-logical) predicates ...
Union of two variable sets Union of two variable sets prolog iso-prolog Union varset_union VarSet1 VarSet2 VarSets VarSet Union of two variable sets Given two lists of variables, what is the most compact and canonical way in ISO Prolog to determine the union of both? That is, we want a definition for the (meta-logical)...
[ 0.020751953125, 0.01544189453125, 0.00634765625, -0.005157470703125, -0.0015411376953125, -0.01080322265625, -0.021728515625, -0.0021209716796875, 0.036865234375, -0.00408935546875, 0.004180908203125, 0.01055908203125, 0.0067138671875, 0.004852294921875, 0.0030059814453125, 0.000231742...
[ 32528, 111, 6626, 77336, 5423, 502, 4867, 13882, 3454, 285, 3509, 87046, 3323, 294, 126, 418, 304, 5303, 2684, 94928, 136, 74413, 21533, 3917, 17408, 1250, 47, 83324, 69941, 15044, 3444, 80934, 35273, 137043, 1653, 2063, 1636, 36998, 91, ...
[ 0.2890625, 0.07171630859375, 0.155029296875, 0.2476806640625, 0.2021484375, 0.1201171875, 0.2132568359375, 0.125, 0.129638671875, 0.16357421875, 0.1605224609375, 0.19677734375, 0.20166015625, 0.1151123046875, 0.133544921875, 0.034454345703125, 0.10430908203125, 0.179931640625, 0....
embed
7864022_c0
7864022
prolog
0
Title: How to sort by letters *and* numbers in prolog? Problem title: How to sort by letters *and* numbers in prolog? Tags: prolog Problem: How to sort by letters *and* numbers in prolog? I have a list in Prolog like the following: [(b,y,3),(p,z,1),(p,y,3),(b,y,2),(p,z,2),(p,x,3),...] where the first element of the fir...
How to sort by letters *and* numbers in prolog? How to sort by letters *and* numbers in prolog? prolog How How to sort by letters *and* numbers in prolog? I have a list in Prolog like the following: where the first element of the first tuple is in [b,p] , the second is in [x,y,z] , and the third is in [1,2,3,4,5,6,7] ....
[ 0.022705078125, 0.0023651123046875, -0.000545501708984375, 0.01348876953125, -0.0205078125, -0.000202178955078125, -0.002716064453125, 0.0004100799560546875, 0.00830078125, -0.016357421875, 0.00177001953125, 0.0159912109375, -0.01348876953125, -0.002288818359375, -0.003173828125, -0.00...
[ 11249, 47, 12096, 390, 120820, 2940, 101935, 23, 502, 4867, 5303, 1250, 25632, 5117, 12830, 370, 8705, 275, 254, 17932, 169, 50960, 155761, 80389, 136555, 99726, 36917, 121413, 24209, 876, 32497, 8108, 915, 113, 97, 17497, 71 ]
[ 0.07635498046875, 0.04913330078125, 0.222412109375, 0.126953125, 0.19140625, 0.1925048828125, 0.1959228515625, 0.0714111328125, 0.170166015625, 0.2266845703125, 0.1121826171875, 0.16015625, 0.001556396484375, 0.061065673828125, 0.1318359375, 0.05908203125, 0.1519775390625, 0.036560...
embed
64983559_c0
64983559
prolog
0
Title: How to count nth prime in prolog Problem title: How to count nth prime in prolog Tags: primes, prolog Problem: How to count nth prime in prolog I'm quite new to prolog and I am trying to write a predicate which gives the value of nth prime number and it looks like nth_prime(N, Prime) . I have already done the fu...
How to count nth prime in prolog How to count nth prime in prolog primes prolog How nth_prime Prime How to count nth prime in prolog I'm quite new to prolog and I am trying to write a predicate which gives the value of nth prime number and it looks like nth_prime(N, Prime) . I have already done the function that counts...
[ -0.01336669921875, -0.00011873245239257812, 0.035400390625, -0.00151824951171875, 0.028564453125, 0.004608154296875, 0.01483154296875, -0.0196533203125, 0.0020751953125, -0.048583984375, -0.000507354736328125, -0.0274658203125, 0.0034027099609375, 0.004547119140625, -0.000606536865234375...
[ 11249, 47, 54529, 653, 927, 20809, 23, 502, 4867, 454, 114654, 56195, 32233, 3525, 31577, 33022, 1653, 2063, 67, 34292, 14012, 33342, 839, 21771, 32354, 2174, 83, 959, 28219, 11737, 29954, 3642, 3129, 186, 10617, 541 ]
[ 0.06658935546875, 0.063232421875, 0.207275390625, 0.207763671875, 0.23828125, 0.24755859375, 0.0877685546875, 0.1583251953125, 0.2135009765625, 0.00341796875, 0.208984375, 0.2178955078125, 0.002105712890625, 0.037994384765625, 0.01507568359375, 0.04931640625, 0.066162109375, 0.0684...
embed
9056057_c0
9056057
prolog
0
Title: How can access a List created in prolog? Problem title: How can access a List created in prolog? Tags: list, store, prolog Problem: How can access a List created in prolog? i need to write a code that should access to list that created. but i don't know how, i read this question: How do I store and access a list...
How can access a List created in prolog? How can access a List created in prolog? list store prolog How List Head Tail Taile my_write How can access a List created in prolog? i need to write a code that should access to list that created. but i don't know how, i read this question: How do I store and access a list with...
[ 0.0234375, 0.00830078125, 0.006805419921875, 0.0267333984375, 0.00921630859375, 0.0196533203125, -0.003204345703125, 0.00933837890625, 0.00909423828125, -0.0439453125, 0.0274658203125, -0.004241943359375, -0.00022792816162109375, -0.00933837890625, 0.00421142578125, -0.0011749267578125...
[ 11249, 831, 17203, 32036, 75935, 502, 4867, 10, 23, 5303, 4343, 44816, 1218, 379, 6098, 133, 759, 18781, 33022, 18151, 5608, 47, 3642, 136, 28032, 77336, 1250, 28282, 3871 ]
[ 0.052520751953125, 0.0643310546875, 0.1978759765625, 0.2327880859375, 0.16259765625, 0.1397705078125, 0.21875, 0.011138916015625, 0.027587890625, 0.188232421875, 0.152587890625, 0.079833984375, 0.054107666015625, 0.05340576171875, 0.0849609375, 0.0767822265625, 0.031890869140625, 0...
embed
22746523_c0
22746523
prolog
0
Title: Element appears exactly once in the list in Prolog Problem title: Element appears exactly once in the list in Prolog Tags: prolog, predicate, list Problem: Element appears exactly once in the list in Prolog I want to write a predicate which check if the Element appeares exactly once in the List. once(Element, Li...
Element appears exactly once in the list in Prolog Element appears exactly once in the list in Prolog prolog predicate list Element Prolog List Element appears exactly once in the list in Prolog I want to write a predicate which check if the Element appeares exactly once in the List. My code: But if I ask: Prolog answe...
[ 0.0030364990234375, 0.009765625, 0.01141357421875, -0.0189208984375, 0.000743865966796875, 0.0162353515625, 0.02587890625, 0.019775390625, 0.00701904296875, -0.0341796875, -0.00543212890625, 0.0022735595703125, -0.010498046875, 0.015625, 0.003631591796875, 0.021240234375, 0.027709960...
[ 48325, 135179, 66161, 24145, 23, 5303, 1250, 4867, 502, 1653, 2063, 32036, 33022, 67, 12765, 2174, 108975, 90, 18151, 26458, 35166, 44084, 7413, 1193, 2203, 501, 29806, 54608 ]
[ 0.230712890625, 0.1546630859375, 0.20849609375, 0.2081298828125, 0.056243896484375, 0.1866455078125, 0.17578125, 0.258544921875, 0.1171875, 0.1104736328125, 0.157958984375, 0.1494140625, 0.019744873046875, 0.05523681640625, 0.1207275390625, 0.0538330078125, 0.1348876953125, 0.06958...
embed
26436906_c0
26436906
prolog
0
Title: List Manipulation in prolog Problem title: List Manipulation in prolog Tags: list, prolog Problem: List Manipulation in prolog Given a list such that [[%,A,B,C,%D,E,%],[%,F,G,%,H,I,J,%]] how do I return [[A,B,C],[D,E],[F,G],[H,I,J]] I tried the following code: filtertolists([],[]). filtertolists([Head|Tail],Y):-...
List Manipulation in prolog List Manipulation in prolog list prolog List Manipulation Head Tail List Manipulation in prolog Given a list such that [[%,A,B,C,%D,E,%],[%,F,G,%,H,I,J,%]] how do I return [[A,B,C],[D,E],[F,G],[H,I,J]] I tried the following code: I want to get the first element from the list of lists, and ch...
[ 0.013671875, 0.01397705078125, 0.0011138916015625, 0.01507568359375, -0.00982666015625, 0.02734375, 0.002777099609375, 0.0157470703125, 0.000667572021484375, 0.004638671875, 0.0098876953125, 0.02294921875, 0.001678466796875, -0.013671875, -0.0093994140625, 0.01318359375, 0.0166015625...
[ 32036, 221169, 2320, 23, 502, 4867, 5303, 44816, 1218, 379, 77878, 6044, 29094, 284, 571, 441, 3949, 919, 724, 841, 1375, 3642, 54, 87, 30646, 110558, 397, 647, 37842, 25632, 18151, 3444, 2046, 5117, 12830, 1295, 12765, 43032, 105950, 105...
[ 0.207763671875, 0.220947265625, 0.06646728515625, 0.0372314453125, 0.1431884765625, 0.2130126953125, 0.2266845703125, 0.1318359375, 0.0987548828125, 0.07513427734375, 0.034027099609375, 0.011566162109375, 0.1151123046875, 0.020355224609375, 0.060333251953125, 0.0606689453125, 0.10711...
embed
19580267_c0
19580267
prolog
0
Title: How to do Arithemetic? Problem title: How to do Arithemetic? Tags: prolog Problem: How to do Arithemetic? :- dynamic somepig/1. runtest :- assert(somepig(6)), % Edit : just to be more precise, somepig is dynamic somepig(X), writeln(X+3). This code ends up printing "6+3". I'm guessing either X is taking a type th...
How to do Arithemetic? How to do Arithemetic? prolog How Arithemetic Edit How to do Arithemetic? This code ends up printing "6+3". I'm guessing either X is taking a type that can't do arthmetic or when I am assigning "somepig" then "6" is automatically considered a string or otherwise. Is there anyway I can explicitly ...
[ 0.006134033203125, -0.00457763671875, 0.00457763671875, 0.021240234375, -0.0029296875, 0.024658203125, -0.00909423828125, 0.01190185546875, 0.00201416015625, -0.02880859375, 0.00421142578125, 0.00185394287109375, -0.024169921875, 0.004364013671875, 0.0211181640625, 0.0086669921875, -...
[ 11249, 47, 54, 1172, 10902, 282, 9523, 502, 4867, 42079, 18151, 3564, 1257, 2448, 1916, 910, 85398, 57767, 1193, 10644, 831, 18, 90134, 95486, 43452, 254, 872, 191082, 90698, 79315, 120262, 109954, 143726, 40140, 18929, 186, 892, 1505, 5113...
[ 0.06964111328125, 0.081298828125, 0.114013671875, 0.1275634765625, 0.177490234375, 0.1748046875, 0.2071533203125, 0.068359375, 0.1031494140625, 0.093017578125, 0.1319580078125, 0.05950927734375, 0.009552001953125, 0.1414794921875, 0.0357666015625, 0.19287109375, 0.2744140625, 0.048...
embed
66920023_c0
66920023
prolog
0
Title: What does construction s() stand for in Prolog? Problem title: What does construction s() stand for in Prolog? Tags: prolog Problem: What does construction s() stand for in Prolog? I have a piece of example code in Prolog. I wonder what the predicate/rule/functor s() means in Prolog? (on line that starts with br...
What does construction s() stand for in Prolog? What does construction s() stand for in Prolog? prolog What Prolog Decision initial_state State breadth_search What does construction s() stand for in Prolog? I have a piece of example code in Prolog. I wonder what the predicate/rule/functor s() means in Prolog? (on line ...
[ 0.0252685546875, 0.01141357421875, -0.00701904296875, 0.00848388671875, -0.01239013671875, 0.001434326171875, -0.0036773681640625, 0.00714111328125, -0.00701904296875, -0.025634765625, 0.015625, -0.011474609375, -0.01129150390625, 0.002532958984375, -0.0014495849609375, -0.005249023437...
[ 4865, 50961, 91, 132, 16, 9157, 100, 23, 1250, 4867, 502, 49132, 61475, 61340, 22836, 179967, 927, 86250, 27781, 18151, 32195, 1653, 2063, 882, 133, 16498, 18770, 26950, 13315, 4034, 21635, 13648, 5426, 67, 93002 ]
[ 0.0284576416015625, 0.2479248046875, 0.2041015625, 0.1820068359375, 0.000732421875, 0.096923828125, 0.07470703125, 0.043914794921875, 0.162353515625, 0.238037109375, 0.1136474609375, 0.1341552734375, 0.06170654296875, 0.10107421875, 0.10382080078125, 0.16650390625, 0.11328125, 0.16...
embed
15701330_c0
15701330
prolog
0
Title: How to consult a file to swi-prolog in a faster way Problem title: How to consult a file to swi-prolog in a faster way Tags: swi-prolog, prolog Problem: How to consult a file to swi-prolog in a faster way I have a prolog file (with the .pl extension), my prolog file is having at least >200000 rows (with file'siz...
How to consult a file to swi-prolog in a faster way How to consult a file to swi-prolog in a faster way swi-prolog prolog How How to consult a file to swi-prolog in a faster way I have a prolog file (with the .pl extension), my prolog file is having at least >200000 rows (with file'size is ~20MB) at the current. Whenev...
[ 0.0169677734375, -0.0037994384765625, 0.007781982421875, 0.00274658203125, -0.0296630859375, -0.02392578125, -0.00592041015625, 0.02392578125, 0.00787353515625, -0.0732421875, 0.02392578125, 0.006134033203125, -0.00848388671875, -0.0289306640625, 0.01556396484375, 0.00469970703125, 0...
[ 11249, 47, 75463, 11435, 91, 2452, 3454, 4867, 4271, 56, 3917, 502, 9, 765, 5, 2424, 111938, 19441, 19713, 1549, 28568, 15555, 62539, 12689, 43581, 4527, 8110, 72367, 147834, 1653, 2063, 51776, 163, 5045, 1733, 2740, 963, 4090, 21049, 503...
[ 0.0733642578125, 0.1185302734375, 0.275146484375, 0.1953125, 0.043914794921875, 0.2161865234375, 0.1763916015625, 0.2578125, 0.131103515625, 0.0997314453125, 0.04547119140625, 0.207275390625, 0.00860595703125, 0.01141357421875, 0.021881103515625, 0.1884765625, 0.1446533203125, 0.03...
embed
38237137_c2
38237137
prolog
2
.3.23 | 7.3.23 | 4.3.2 | 4.3.3 | --------+-----------------+-------------------| bench_1 | 4547 ms | 3704ms | 900ms | 780ms | bench_2 | 4562ms | 3619ms | 970ms | 850ms | bench_3 | 4541ms | 3603ms | 970ms | 870ms | bench_4 | 4541ms | 3633ms | 940ms | 890ms | bench_5 | 4502ms | 3632ms | 950ms | 840ms | --------+---------...
.3.23 | 7.3.23 | 4.3.2 | 4.3.3 | --------+-----------------+-------------------| bench_1 | 4547 ms | 3704ms | 900ms | 780ms | bench_2 | 4562ms | 3619ms | 970ms | 850ms | bench_3 | 4541ms | 3603ms | 970ms | 870ms | bench_4 | 4541ms | 3633ms | 940ms | 890ms | bench_5 | 4502ms | 3632ms | 950ms | 840ms | --------+---------...
[ -0.0169677734375, -0.01336669921875, 0.0037994384765625, 0.0052490234375, 0.00274658203125, -0.00836181640625, -0.01220703125, 0.0036468505859375, 0.01165771484375, 0.009033203125, 0.0164794921875, 0.01409912109375, -0.0225830078125, 0.00079345703125, -0.005828857421875, -0.01287841796...
[ 6, 28705, 3742, 58745, 361, 1398, 107033, 134693, 110405, 1328, 103428, 1585, 206, 115187, 2678, 13330, 68163, 4669, 7709, 4432, 18351, 99263, 304, 10837, 2947, 134131, 71242, 363, 8894, 18139, 132067, 617, 192530, 758, 23547, 169771, 112965, ...
[ 0.068359375, 0.1610107421875, 0.1954345703125, 0.07171630859375, 0.080078125, 0.091796875, 0.171630859375, 0.1871337890625, 0.040252685546875, 0.0404052734375, 0.022125244140625, 0.1873779296875, 0.16357421875, 0.179443359375, 0.0972900390625, 0.116943359375, 0.1300048828125, 0.026...
embed
65672031_c1
65672031
prolog
1
3 = s(0), L = [3] ; N1 = s(s(0)), N2 = N3, N3 = 0, L = [1,1] ; ... I have come up with the following solution: f(0,0,0,[]). f(s(N1),N2,N3,[1|Xs]) :- f(N1,N2,N3,Xs). f(N1,s(N2),N3,[2|Xs]) :- f(N1,N2,N3,Xs). f(N1,N2,succ(N3),[3|Xs]) :- f(N1,N2,N3,Xs). This solution works for the first query, however, for the second query...
3 = s(0), L = [3] ; N1 = s(s(0)), N2 = N3, N3 = 0, L = [1,1] ; ... I have come up with the following solution: f(0,0,0,[]). f(s(N1),N2,N3,[1|Xs]) :- f(N1,N2,N3,Xs). f(N1,s(N2),N3,[2|Xs]) :- f(N1,N2,N3,Xs). f(N1,N2,succ(N3),[3|Xs]) :- f(N1,N2,N3,Xs). This solution works for the first query, however, for the second query...
[ -0.0257568359375, 0.01409912109375, -0.02197265625, -0.0159912109375, 0.00115966796875, 0.0028228759765625, -0.00994873046875, 0.0037078857421875, 0.00994873046875, -0.037841796875, 0.024169921875, -0.0011138916015625, 0.00160980224609375, 0.01123046875, 0.005706787109375, 0.0104370117...
[ 138, 2203, 91, 177609, 339, 50740, 541, 418, 7, 304, 363, 757, 76172, 153, 87, 765, 1380, 1257, 678, 25632, 29806, 1238, 132, 2389, 4, 63527, 1065, 194, 839, 17727, 1542, 268, 16, 15772, 10461, 1159, 10060, 21320, 3293, 43240, 70, 511...
[ 0.260498046875, 0.117919921875, 0.1336669921875, 0.2342529296875, 0.1712646484375, 0.1229248046875, 0.1640625, 0.1414794921875, 0.131103515625, 0.185791015625, 0.2447509765625, 0.1304931640625, 0.07183837890625, 0.036651611328125, 0.04864501953125, 0.0158233642578125, 0.0455932617187...
embed