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
17751183_c0
17751183
prolog
0
Title: List Transformation Problem title: List Transformation Tags: prolog Problem: List Transformation I have a list: L = [1,2,3,4,5,6,7,8] I would like to transform it into this: L= [ex(1,2),ex(3,4),ex(5,6),ex(7,8)] How can I effectively do this? [edited to add:] This is what I have so far: convert( [] , S ) . conver...
List Transformation List Transformation prolog List Transformation Rest List Transformation I have a list: I would like to transform it into this: How can I effectively do this? [edited to add:] This is what I have so far:
[ 0.0001583099365234375, 0.024169921875, 0.0084228515625, 0.0034637451171875, -0.001495361328125, 0.017333984375, -0.028564453125, 0.01080322265625, 0.01519775390625, -0.01214599609375, 0.0238037109375, -0.00396728515625, -0.01324462890625, -0.005889892578125, 0.004302978515625, 0.006561...
[ 32036, 149855, 1363, 502, 4867, 49756, 87, 765, 10, 5303, 2806, 1884, 47, 27198, 442, 3934, 903, 11249, 831, 191984, 54, 45082, 15190, 2060 ]
[ 0.2352294921875, 0.257568359375, 0.08245849609375, 0.1248779296875, 0.17529296875, 0.1705322265625, 0.03240966796875, 0.1060791015625, 0.087158203125, 0.256591796875, 0.09814453125, 0.1439208984375, 0.09344482421875, 0.26611328125, 0.0640869140625, 0.157470703125, 0.1812744140625, ...
embed
58962846_c0
58962846
prolog
0
Title: Prolog intersection of list elements Problem title: Prolog intersection of list elements Tags: intersection, list, prolog Problem: Prolog intersection of list elements I have a list of 8 elements: [[a], [a], [a, b], [b, c], [c, d, e], [d, f], [f], [f]] The goal is to have a list with intersection of adjacent ele...
Prolog intersection of list elements Prolog intersection of list elements intersection list prolog Prolog Prolog intersection of list elements I have a list of 8 elements: [[a], [a], [a, b], [b, c], [c, d, e], [d, f], [f], [f]] The goal is to have a list with intersection of adjacent elements: [[a], [a], [b], [c], [d],...
[ 0.0069580078125, 0.00628662109375, 0.01416015625, 0.01025390625, -0.0174560546875, 0.030517578125, -0.01611328125, -0.01141357421875, 0.00069427490234375, -0.029296875, -0.000743865966796875, 0.0235595703125, -0.0068359375, 0.0064697265625, 0.00897216796875, 0.0167236328125, 0.016967...
[ 1250, 4867, 1940, 7, 58994, 5303, 80854, 111, 502, 87, 765, 10, 382, 876, 501, 104, 28, 1238, 420, 69236, 83, 47, 678, 123594, 16797, 2965, 3917, 54, 450, 23 ]
[ 0.198974609375, 0.263916015625, 0.208740234375, 0.19921875, 0.199951171875, 0.2198486328125, 0.2200927734375, 0.0738525390625, 0.1539306640625, 0.037139892578125, 0.0784912109375, 0.031829833984375, 0.18603515625, 0.0802001953125, 0.050262451171875, 0.0611572265625, 0.0762939453125, ...
embed
25356094_c0
25356094
prolog
0
Title: Quadratic equation solving in Prolog Problem title: Quadratic equation solving in Prolog Tags: prolog Problem: Quadratic equation solving in Prolog I have wrote a code to solve equation with like terms (eg:- x^2+5*x+6=0). Here 'x' has two values. I can take two values by entering ';'. But I need to get the all p...
Quadratic equation solving in Prolog Quadratic equation solving in Prolog prolog Quadratic Prolog Quadratic equation solving in Prolog I have wrote a code to solve equation with like terms (eg:- x^2+5*x+6=0). Here 'x' has two values. I can take two values by entering ';'. But I need to get the all possible answers when...
[ 0.01953125, 0.0184326171875, 0.00994873046875, 0.013671875, -0.01409912109375, 0.01116943359375, 0.0018768310546875, 0.01031494140625, -0.005889892578125, -0.023681640625, 0.0086669921875, -0.00193023681640625, 0.00592041015625, -0.006103515625, -0.0012054443359375, -0.0076904296875, ...
[ 83227, 219, 9523, 28, 5490, 2320, 3115, 6496, 23, 1250, 4867, 502, 54397, 18151, 86869, 1884, 69407, 8353, 304, 131815, 1639, 425, 1328, 910, 145407, 6626, 142424, 831, 5646, 22, 33558, 74, 3871, 2046, 756, 7722, 35166, 11675, 1528, 24145...
[ 0.1429443359375, 0.1282958984375, 0.1387939453125, 0.033172607421875, 0.180908203125, 0.03656005859375, 0.08819580078125, 0.0667724609375, 0.05267333984375, 0.15771484375, 0.2447509765625, 0.112548828125, 0.030120849609375, 0.1187744140625, 0.1427001953125, 0.12353515625, 0.143066406...
embed
28972142_c0
28972142
prolog
0
Title: Prolog Sorting approach Problem title: Prolog Sorting approach Tags: prolog Problem: Prolog Sorting approach Hı guys.I have a problem about prolog example.I have written following fact and rule to my database file but my database file doesn^t work while I compile it.Do you have any idea? The error that I get is ...
Prolog Sorting approach Prolog Sorting approach prolog Prolog Sorting Prolog Sorting approach Hı guys.I have a problem about prolog example.I have written following fact and rule to my database file but my database file doesn^t work while I compile it.Do you have any idea? The error that I get is singleton variables
[ 0.034912109375, 0.002899169921875, 0.008544921875, -0.006011962890625, -0.00726318359375, 0.01544189453125, -0.01708984375, -0.0247802734375, 0.005035400390625, -0.0264892578125, -0.006439208984375, 0.009765625, -0.00750732421875, -0.021728515625, 0.003814697265625, -0.0145263671875, ...
[ 1250, 4867, 53666, 214, 51515, 502, 1057, 51484, 2967, 27781, 59121, 25632, 15824, 136, 79986, 63399, 11435, 1284, 22027, 8353, 18, 4488, 12960, 9969, 1340, 6528, 18499, 83, 11001, 1507, 77336, 7 ]
[ 0.18408203125, 0.320556640625, 0.218994140625, 0.08880615234375, 0.2001953125, 0.15234375, 0.046478271484375, 0.05474853515625, 0.08831787109375, 0.172119140625, 0.09100341796875, 0.130615234375, 0.1578369140625, 0.06658935546875, 0.1649169921875, 0.1934814453125, 0.1373291015625, ...
embed
22140434_c0
22140434
prolog
0
Title: How to find divide list in prolog. dividelist(List,List1,List2) Problem title: How to find divide list in prolog. dividelist(List,List1,List2) Tags: prolog Problem: How to find divide list in prolog. dividelist(List,List1,List2) dividelist(List,List1,List2) so that the elements of List are partitioned between Li...
How to find divide list in prolog. dividelist(List,List1,List2) How to find divide list in prolog. dividelist(List,List1,List2) prolog How List List1 List2 How to find divide list in prolog. dividelist(List,List1,List2) dividelist(List,List1,List2) so that the elements of List are partitioned between List1 and List2. F...
[ 0.02197265625, -0.005218505859375, 0.005950927734375, 0.018798828125, -0.01446533203125, 0.0157470703125, -0.006317138671875, 0.022216796875, 0.000835418701171875, 0.006805419921875, 0.017578125, -0.0021514892578125, 0, 0.00872802734375, -0.00787353515625, 0.006744384765625, 0.019653...
[ 7413, 101637, 5303, 502, 4867, 6562, 154663, 10461, 23, 418, 11249, 32036, 304, 80854, 2878, 1363, 17721, 5442 ]
[ 0.1185302734375, 0.250732421875, 0.2275390625, 0.147216796875, 0.2012939453125, 0.18017578125, 0.136474609375, 0.1146240234375, 0.0125732421875, 0.0399169921875, 0.003173828125, 0.1446533203125, 0.1082763671875, 0.072509765625, 0.119873046875, 0.06884765625, 0.048492431640625, 0.10...
embed
60232857_c0
60232857
prolog
0
Title: Make swi prolog to return the predicate name Problem title: Make swi prolog to return the predicate name Tags: prolog Problem: Make swi prolog to return the predicate name sorry i just want to return the predicate name america america('kin'). novelist('kin'). writer(X):- novelist(X). when i query swi below write...
Make swi prolog to return the predicate name Make swi prolog to return the predicate name prolog Make Make swi prolog to return the predicate name sorry i just want to return the predicate name america when i query swi below writer(A),novelist(A) it just match A = 'kin' how to change the swi to make it return america?
[ 0.0118408203125, 0.0113525390625, 0.00616455078125, 0.0147705078125, -0.0299072265625, 0.015625, 0.0191650390625, 0.01080322265625, 0.00738525390625, -0.033447265625, 0.0125732421875, 0.00323486328125, -0.0208740234375, -0.0164794921875, 0.00927734375, -0.008056640625, 0.01513671875,...
[ 26176, 91, 2452, 502, 4867, 47, 30646, 1653, 2063, 67, 9351, 59090, 3444, 70, 152644, 41, 1294, 35064, 70035, 284, 69478, 6562, 14858, 62, 2203, 875, 3642, 15549, 3249 ]
[ 0.130126953125, 0.1005859375, 0.252197265625, 0.1641845703125, 0.25830078125, 0.04498291015625, 0.199951171875, 0.1480712890625, 0.2098388671875, 0.126220703125, 0.1710205078125, 0.06915283203125, 0.09002685546875, 0.053802490234375, 0.2274169921875, 0.08642578125, 0.0931396484375, ...
embed
65737468_c1
65737468
prolog
1
, 3, _17602|_17604], [3, 1, 5, _17650|_17652], [2, 4, 9, _17698|_17700]|_17658] How Can I Delete : _17602| _17604...._17650|_17652..._17698|_17700]|_17658 ? Thank you. Code signals: Prolog, Given, Matrix, transpose_matrix, New_Matrix, Num_Rows, nth0, First_Row, Num_Cols, Row, Col, Element, Rest, Rest1, Current_Row, Row...
, 3, _17602|_17604], [3, 1, 5, _17650|_17652], [2, 4, 9, _17698|_17700]|_17658] How Can I Delete : _17602| _17604...._17650|_17652..._17698|_17700]|_17658 ? Thank you. Code signals: Prolog, Given, Matrix, transpose_matrix, New_Matrix, Num_Rows, nth0, First_Row, Num_Cols, Row, Col, Element, Rest, Rest1, Current_Row, Row...
[ -0.0078125, 0.02001953125, -0.00159454345703125, 0.017578125, -0.01708984375, -0.0037078857421875, 0.00262451171875, 0.023193359375, 0.0198974609375, 0.01708984375, 0.0140380859375, -0.0115966796875, 0.00058746337890625, 0.0096435546875, -0.005645751953125, 0.008544921875, 0.01464843...
[ 6, 138, 4, 101, 160037, 9550, 58745, 2489, 193438, 268, 122101, 106, 190, 85399, 159874, 90173, 304, 201, 483, 174543, 15128, 192066, 11249, 4171, 87, 262, 46485, 152, 39876, 27, 187065, 454, 705, 28864, 26073, 7, 12, 1250, 4867, 77878, ...
[ 0.000732421875, 0.14208984375, 0.03717041015625, 0.02587890625, 0.26123046875, 0.274169921875, 0.07464599609375, 0.1422119140625, 0.23095703125, 0.07470703125, 0.015655517578125, 0.00830078125, 0.07525634765625, 0.248291015625, 0.11767578125, 0.054779052734375, 0.01837158203125, 0....
embed
19595575_c0
19595575
prolog
0
Title: Prolog. How to access the members of a list in a fact? Problem title: Prolog. How to access the members of a list in a fact? Tags: prolog Problem: Prolog. How to access the members of a list in a fact? Suppose, I have a fact with list: members([a,b,c,d]). How to write rule: ismember(X) %returns 'Yes' only if X i...
Prolog. How to access the members of a list in a fact? Prolog. How to access the members of a list in a fact? prolog Prolog How Yes Prolog. How to access the members of a list in a fact? Suppose, I have a fact with list: How to write rule: Needed a solution with pure Prolog, without any libraries.
[ 0.01611328125, -0.007293701171875, 0.03173828125, 0.0245361328125, -0.01611328125, 0.0262451171875, 0.0159912109375, 0.0269775390625, 0.006988525390625, -0.02490234375, 0.01031494140625, 0.00061798095703125, -0.00726318359375, -0.006256103515625, 0.00604248046875, -0.0181884765625, -...
[ 1250, 4867, 11249, 47, 17203, 43032, 111, 5303, 23, 15824, 70, 10, 502, 32635, 765, 678, 33022, 79986, 52889, 29806, 34166, 15490, 35773 ]
[ 0.1607666015625, 0.2484130859375, 0.10345458984375, 0.061737060546875, 0.2174072265625, 0.205322265625, 0.0771484375, 0.2052001953125, 0.08050537109375, 0.2039794921875, 0.010589599609375, 0.0250091552734375, 0.12249755859375, 0.07025146484375, 0.01338958740234375, 0.0787353515625, 0...
embed
72031104_c0
72031104
prolog
0
Title: Check if list is made up by bytes only - Prolog Problem title: Check if list is made up by bytes only - Prolog Tags: prolog Problem: Check if list is made up by bytes only - Prolog I need to write a predicate that checks if the list is made up only by binary digits: %Define a binary digit type bind(0). bind(1). ...
Check if list is made up by bytes only - Prolog Check if list is made up by bytes only - Prolog prolog Check Prolog Define Predicate byte_list Check if list is made up by bytes only - Prolog I need to write a predicate that checks if the list is made up only by binary digits:
[ -0.005035400390625, 0.000858306884765625, 0.000331878662109375, 0.0028228759765625, -0.0150146484375, 0.020751953125, -0.00408935546875, 0.00958251953125, 0.014892578125, 0.0024566650390625, -0.003448486328125, -0.03466796875, 0.009765625, 0.0135498046875, -0.01318359375, 0.0205078125,...
[ 38679, 2174, 5303, 83, 7228, 1257, 390, 1636, 4734, 1250, 4867, 502, 64552, 7145, 2063, 67, 6562, 3871, 33022, 1653, 12765, 2394, 6635, 153939 ]
[ 0.1302490234375, 0.07305908203125, 0.2095947265625, 0.00623321533203125, 0.1002197265625, 0.08551025390625, 0.1551513671875, 0.1365966796875, 0.09967041015625, 0.11151123046875, 0.182861328125, 0.046356201171875, 0.1082763671875, 0.124755859375, 0.1719970703125, 0.157470703125, 0.188...
embed
23264828_c0
23264828
prolog
0
Title: Prolog, working with capital letter Problem title: Prolog, working with capital letter Tags: variables, prolog Problem: Prolog, working with capital letter I am working on database project in SWI-Prolog. Problem is that i want to work with names of Sportsmen which i read from input. I need to save their names wi...
Prolog, working with capital letter Prolog, working with capital letter variables prolog Prolog Prolog, working with capital letter I am working on database project in SWI-Prolog. Problem is that i want to work with names of Sportsmen which i read from input. I need to save their names with capital letters, but prolog ...
[ 0.0172119140625, 0.0026092529296875, -0.000823974609375, 0.009765625, 0.01019287109375, 0.0186767578125, -0.0019073486328125, 0.0233154296875, -0.010986328125, -0.021240234375, -0.00165557861328125, -0.01190185546875, -0.0206298828125, -0.0014190673828125, 0.01043701171875, 0.00390625,...
[ 1250, 4867, 20697, 678, 10323, 31330, 77336, 502, 63399, 13452, 159, 38969, 9, 10752, 15649, 3444, 4488, 123055, 111, 39170, 1055, 17, 12301, 1295, 107730, 3871, 30098, 2363, 120820, 1284, 29481, 6097, 237, 25647, 30022, 903 ]
[ 0.157470703125, 0.296142578125, 0.10589599609375, 0.089599609375, 0.1728515625, 0.1898193359375, 0.246337890625, 0.109375, 0.133056640625, 0.108642578125, 0.048370361328125, 0.18115234375, 0.012481689453125, 0.12109375, 0.111572265625, 0.05645751953125, 0.11083984375, 0.16943359375...
embed
5071782_c0
5071782
prolog
0
Title: Query for facts from list Problem title: Query for facts from list Tags: prolog Problem: Query for facts from list I am new to prolog and i want to solve this problem. Suppose I have a list say List i.e. [a,b,c] now i have some facts say likes(a,banana). likes(b,orange). likes(c,apple). likes(d,grapes). So if I ...
Query for facts from list Query for facts from list prolog list Query my_functor Query for facts from list I am new to prolog and i want to solve this problem. Suppose I have a list say List i.e. [a,b,c] now i have some facts say likes(a,banana). likes(b,orange). likes(c,apple). likes(d,grapes). So if I make a query ?-...
[ 0.0213623046875, -0.004913330078125, 0.00067901611328125, 0.01806640625, -0.0057373046875, 0.0103759765625, 0.0216064453125, 0.010986328125, 0.0072021484375, -0.0400390625, -0.00250244140625, -0.00811767578125, -0.0145263671875, 0.01300048828125, -0.020751953125, 0.008056640625, 0.02...
[ 58836, 53, 100, 15824, 7, 1295, 5303, 502, 4867, 759, 454, 16498, 18770, 3525, 3444, 86869, 2967, 121691, 765, 5154, 32036, 11, 275, 238, 5036, 3060, 1884, 105281, 10727, 9007, 133, 71, 5739, 13569, 3249, 41, 1294, 705, 154663, 1542, 11...
[ 0.232177734375, 0.0953369140625, 0.169189453125, 0.249267578125, 0.1478271484375, 0.1983642578125, 0.2783203125, 0.1710205078125, 0.234375, 0.1964111328125, 0.0181884765625, 0.1826171875, 0.2230224609375, 0.03558349609375, 0.04833984375, 0.07427978515625, 0.07464599609375, 0.022293...
embed
67755018_c0
67755018
prolog
0
Title: Prolog apply predicate to list elements with maplist Problem title: Prolog apply predicate to list elements with maplist Tags: maplist, prolog Problem: Prolog apply predicate to list elements with maplist I am trying to do a simple tranformation to all elemnts of a list: trans(X, M, Y):- Y is X*(-1) - M. Then I ...
Prolog apply predicate to list elements with maplist Prolog apply predicate to list elements with maplist maplist prolog Prolog Prolog apply predicate to list elements with maplist I am trying to do a simple tranformation to all elemnts of a list: Then I am writing: maplist(trans, [1,2,3], NEW). I am getting a just a t...
[ 0.0087890625, -0.0007171630859375, 0.02197265625, -0.002410888671875, -0.02880859375, 0.0228271484375, -0.0012969970703125, 0.02978515625, -0.00750732421875, -0.0240478515625, 0.0167236328125, 0.003875732421875, -0.0224609375, 0.00119781494140625, 0.006011962890625, 0.003326416015625, ...
[ 1250, 4867, 59911, 1653, 2063, 67, 47, 5303, 80854, 678, 22288, 6562, 502, 31577, 8781, 30334, 5037, 2320, 756, 88, 195, 16037, 32562, 30145, 68252, 155761, 80111, 20949, 1660, 29568, 64457, 3525 ]
[ 0.154296875, 0.224365234375, 0.1134033203125, 0.1871337890625, 0.2178955078125, 0.130859375, 0.1094970703125, 0.207275390625, 0.1949462890625, 0.11083984375, 0.19775390625, 0.25390625, 0.099609375, 0.061737060546875, 0.0811767578125, 0.09100341796875, 0.1724853515625, 0.06109619140...
embed
30764884_c1
30764884
prolog
1
0] that can not be taken as (2*10000+3)*10, but as 2*10000+3*10. Another example is [2 10 1 10000 3 10] that is (2*10+1)*10000+3*10. Proof of not homework: Interest on this numbering (and, in general, in natural language) is that, in some context, they are more error-safe than binary. By example, in a context of a supe...
0] that can not be taken as (2*10000+3)*10, but as 2*10000+3*10. Another example is [2 10 1 10000 3 10] that is (2*10+1)*10000+3*10. Proof of not homework: Interest on this numbering (and, in general, in natural language) is that, in some context, they are more error-safe than binary. By example, in a context of a supe...
[ -0.0030975341796875, 0.007659912109375, -0.013916015625, 0.0118408203125, 0.00750732421875, 0.02880859375, -0.0181884765625, -0.00665283203125, 0.0140380859375, -0.01153564453125, -0.0021514892578125, 0.0021820068359375, 0.012939453125, 0.01336669921875, -0.010986328125, 0.008544921875...
[ 757, 268, 450, 831, 959, 39958, 237, 4700, 1639, 191281, 85398, 16, 963, 1284, 116, 5, 116267, 27781, 83, 304, 209, 106, 77433, 138, 21748, 1250, 4390, 111, 5368, 18244, 66348, 903, 14012, 214, 4537, 6083, 46876, 43701, 1836, 1286, 1849...
[ 0.21435546875, 0.1448974609375, 0.0587158203125, 0.103515625, 0.1304931640625, 0.127197265625, 0.0736083984375, 0.06976318359375, 0.061767578125, 0.18896484375, 0.21923828125, 0.003875732421875, 0.1993408203125, 0.011749267578125, 0.06805419921875, 0.05596923828125, 0.03668212890625,...
embed
4585542_c2
4585542
prolog
2
, opera, sol , sevilla, banco_de_espana, retiro, principe_de_vergara, goya] ; ... The problem is that "L" content two instances of "sol". I don't know where is the problem. I think that don't build the way well. Code signals: Underground, Prolog, cuatro_caminos, san_bernardo, santo_domingo, banco_de_espana, principe_de...
, opera, sol , sevilla, banco_de_espana, retiro, principe_de_vergara, goya] ; ... The problem is that "L" content two instances of "sol". I don't know where is the problem. I think that don't build the way well. Code signals: Underground, Prolog, cuatro_caminos, san_bernardo, santo_domingo, banco_de_espana, principe_de...
[ -0.00579833984375, 0.00072479248046875, -0.0103759765625, 0.00167083740234375, -0.009765625, 0.009765625, -0.00188446044921875, -0.00677490234375, 0.013671875, -0.01324462890625, -0.0062255859375, 0.002105712890625, 0.00506591796875, 0.01031494140625, -0.006622314453125, -0.00236511230...
[ 6264, 3115, 40, 36417, 66799, 112, 41279, 35425, 516, 62062, 814, 17117, 738, 395, 2967, 83, 450, 866, 10941, 6626, 110527, 111, 8748, 70, 87, 5351, 18, 45367, 5299, 28864, 26073, 7, 9626, 64330, 1250, 4867, 50871, 34030, 2245, 43932, 1...
[ 0.199462890625, 0.2452392578125, 0.031585693359375, 0.1888427734375, 0.1441650390625, 0.0762939453125, 0.114990234375, 0.09405517578125, 0.0604248046875, 0.11279296875, 0.019775390625, 0.1669921875, 0.00152587890625, 0.1290283203125, 0.1787109375, 0.0372314453125, 0.0418701171875, ...
embed
2148567_c1
2148567
prolog
1
2,R1,T1),\+conflicts(T2,R3,T3), can_run(R3,T3),\+conflicts(T3,R1,T1),\+conflicts(T3,R2,T2). % when traced I *should* see T1=0, T2=400, T3=200 Edit: conflicts goal wasn't quite right: needed extra T>T1 clause. Edit: Apparently my schedule goal works if I supply valid Request,Time pairs ... but I'm stuck trying to force ...
2,R1,T1),\+conflicts(T2,R3,T3), can_run(R3,T3),\+conflicts(T3,R1,T1),\+conflicts(T3,R2,T2). % when traced I *should* see T1=0, T2=400, T3=200 Edit: conflicts goal wasn't quite right: needed extra T>T1 clause. Edit: Apparently my schedule goal works if I supply valid Request,Time pairs ... but I'm stuck trying to force ...
[ 0.00469970703125, 0.0228271484375, 0.016357421875, 0.0185546875, -0.02783203125, -0.031005859375, -0.01129150390625, 0.00811767578125, 0.012451171875, -0.0196533203125, 0.00506591796875, 0.00726318359375, -0.007598876953125, 0.007568359375, 0.0002994537353515625, -0.00384521484375, 0...
[ 116, 1052, 418, 618, 17727, 1328, 2271, 134225, 7, 304, 363, 21320, 831, 16428, 10461, 144851, 1957, 384, 145407, 1369, 10700, 5955, 79612, 69236, 7108, 4173, 70731, 759, 80889, 43240, 100677, 35604, 75616, 70059, 80836, 179933, 37772, 1250, ...
[ 0.0772705078125, 0.06085205078125, 0.0859375, 0.06512451171875, 0.06976318359375, 0.05255126953125, 0.050140380859375, 0.2044677734375, 0.048583984375, 0.08831787109375, 0.1827392578125, 0.15625, 0.130126953125, 0.174560546875, 0.053436279296875, 0.1849365234375, 0.0295562744140625, ...
embed
42078614_c0
42078614
prolog
0
Title: Prolog program returns false Problem title: Prolog program returns false Tags: prolog-toplevel, prolog Problem: Prolog program returns false I implemented the following power program in Prolog: puissance(_,0,1). puissance(X,N,P) :- N>0,A is N-1, puissance(X,A,Z), P is Z*X. The code does what is supposed to do, b...
Prolog program returns false Prolog program returns false prolog-toplevel prolog Prolog N-1 Prolog program returns false I implemented the following power program in Prolog: The code does what is supposed to do, but after the right answer it prints "false.". I don't understand why. I am using swi-prolog.
[ 0.004425048828125, 0.0029296875, 0.0126953125, 0.01708984375, -0.0120849609375, 0.0115966796875, 0.00408935546875, 0.0002899169921875, 0.00142669677734375, -0.010009765625, 0.00116729736328125, -0.00225830078125, -0.0234375, 0.01141357421875, 0.0026702880859375, 0.0098876953125, 0.02...
[ 1250, 4867, 1528, 30646, 98320, 502, 13784, 67919, 541, 5759, 7, 29479, 25632, 14537, 18151, 14602, 134598, 54, 1284, 7103, 7108, 35166, 28412, 8710, 184, 28219, 15400, 17368, 2452, 3454 ]
[ 0.1690673828125, 0.2491455078125, 0.2109375, 0.199951171875, 0.2471923828125, 0.11376953125, 0.06903076171875, 0.14013671875, 0.0303802490234375, 0.09210205078125, 0.015411376953125, 0.11151123046875, 0.02764892578125, 0.180908203125, 0.1484375, 0.0168304443359375, 0.0606689453125, ...
embed
35970092_c0
35970092
prolog
0
Title: prolog check element existence in list Problem title: prolog check element existence in list Tags: element, list, prolog Problem: prolog check element existence in list for the question "how to check if the 3 is member of a list" I defined the follow predicate member(E,[E|_]). member(E,[_|R] :- member(E,R). isth...
prolog check element existence in list prolog check element existence in list element list prolog prolog check element existence in list for the question "how to check if the 3 is member of a list" I defined the follow predicate but how to "check whether 3 OR 4 is member of a list"? any hint? (3 AND 4 is easy though).
[ -0.0128173828125, 0.000621795654296875, 0.006317138671875, -0.0001277923583984375, -0.0186767578125, 0.0030059814453125, 0.00640869140625, 0.0181884765625, 0.0191650390625, -0.0279541015625, 0.0263671875, 0.0027313232421875, 0.01373291015625, -0.006927490234375, 0.0029754638671875, 0.0...
[ 502, 4867, 12765, 12830, 116311, 23, 5303, 47251, 2174, 138, 83, 32786, 111, 61924, 28960, 1653, 2063, 3642, 47, 78292, 36766, 33172, 201, 5122, 6896, 48762, 23468 ]
[ 0.1497802734375, 0.220458984375, 0.1976318359375, 0.22412109375, 0.210693359375, 0.072265625, 0.1962890625, 0.019775390625, 0.0731201171875, 0.2030029296875, 0.0877685546875, 0.1982421875, 0.1002197265625, 0.04559326171875, 0.1807861328125, 0.07733154296875, 0.08917236328125, 0.022...
embed
71246384_c0
71246384
prolog
0
Title: How to have a fact have multiple values in prolog? Problem title: How to have a fact have multiple values in prolog? Tags: prolog Problem: How to have a fact have multiple values in prolog? I am wondering how I can make a fact have multiple values for example: answer(1-100, 'yes'). answer(100-700, 'no). For 1-10...
How to have a fact have multiple values in prolog? How to have a fact have multiple values in prolog? prolog How How to have a fact have multiple values in prolog? I am wondering how I can make a fact have multiple values for example: For 1-100 it would be yes and 100-700 it would be no. Writing thousands of facts woul...
[ 0.0152587890625, -0.00006198883056640625, -0.0030670166015625, -0.004547119140625, -0.00506591796875, 0.01312255859375, 0.0169677734375, -0.0155029296875, 0.00274658203125, -0.005401611328125, -0.00909423828125, 0.0125732421875, -0.0038299560546875, -0.0029296875, -0.0177001953125, -0....
[ 11249, 47, 765, 10, 15824, 48716, 142424, 23, 502, 4867, 149016, 3642, 831, 3249, 1326, 106, 45881, 2806, 186, 72272, 136, 37682, 15128, 110, 213185, 137107, 5792, 1733, 18588 ]
[ 0.099853515625, 0.06170654296875, 0.12481689453125, 0.0889892578125, 0.2225341796875, 0.2666015625, 0.251220703125, 0.09051513671875, 0.15234375, 0.2261962890625, 0.01922607421875, 0.037078857421875, 0.0226287841796875, 0.08209228515625, 0.00606536865234375, 0.0272979736328125, 0.167...
embed
15542755_c0
15542755
prolog
0
Title: Prolog binary tree node value count Problem title: Prolog binary tree node value count Tags: prolog Problem: Prolog binary tree node value count Can anyone help me how to realize predicate in Prolog which counts the all the node numbers of a binary tree? For example: tree1(tree(1, tree(2, tree(3,nil,nil), tree(4...
Prolog binary tree node value count Prolog binary tree node value count prolog Prolog tree1 Prolog binary tree node value count Can anyone help me how to realize predicate in Prolog which counts the all the node numbers of a binary tree? For example: Would return 28. Anyone can help?
[ 0.033447265625, -0.00179290771484375, -0.0242919921875, -0.0086669921875, 0.0084228515625, 0.0111083984375, -0.0235595703125, -0.00787353515625, 0.01312255859375, -0.060302734375, -0.03125, -0.00933837890625, 0.0120849609375, 0.00775146484375, 0.04736328125, -0.009765625, 0.017456054...
[ 1250, 4867, 2394, 6635, 53201, 110, 112, 34292, 54529, 502, 418, 4358, 92154, 1653, 2063, 67, 23, 7, 756, 101935, 154559, 30646, 12511 ]
[ 0.181396484375, 0.2431640625, 0.1568603515625, 0.0740966796875, 0.1917724609375, 0.1650390625, 0.1505126953125, 0.2098388671875, 0.1837158203125, 0.1082763671875, 0.035430908203125, 0.042755126953125, 0.11968994140625, 0.1568603515625, 0.20166015625, 0.0849609375, 0.00207901000976562...
embed
28933449_c1
28933449
prolog
1
fix this, I updated the code to: xyz-final(X,Y):- fun(X,Z), Z\=0, ( length(Z,1) -> xyz(X,J), reverse(J,Y) ; xyz2(X,B), sort(B,C), reverse(C,Y) ). xyz(K, [X|Y]):- fun(K, [X]), !, xyz(X, Y). xyz(_, []). xyz2(X, Y) :- fun(X,Z) -> findall([A|B], (member(A,Z), xyz2(A,B)), L), flatten(L,Y); Y = []. Very clumsy approach, but...
fix this, I updated the code to: xyz-final(X,Y):- fun(X,Z), Z\=0, ( length(Z,1) -> xyz(X,J), reverse(J,Y) ; xyz2(X,B), sort(B,C), reverse(C,Y) ). xyz(K, [X|Y]):- fun(K, [X]), !, xyz(X, Y). xyz(_, []). xyz2(X, Y) :- fun(X,Z) -> findall([A|B], (member(A,Z), xyz2(A,B)), L), flatten(L,Y); Y = []. Very clumsy approach, but...
[ 0.02099609375, 0.02783203125, 0.00604248046875, 0.0002593994140625, -0.013671875, 0.01397705078125, -0.0059814453125, -0.01214599609375, 0.01904296875, 0.000621795654296875, -0.003570556640625, 0.0052490234375, 0.01055908203125, -0.013916015625, 0.0093994140625, -0.003448486328125, -...
[ 30022, 903, 87, 150011, 70, 18151, 47, 1022, 32189, 9, 33870, 1542, 4, 1723, 7477, 1511, 247, 567, 145407, 140909, 17727, 33079, 1375, 39531, 184, 304, 571, 12096, 605, 711, 990, 7413, 5584, 58745, 27417, 339, 49878, 510, 2203, 99342, 4...
[ 0.14208984375, 0.07342529296875, 0.007568359375, 0.181640625, 0.008514404296875, 0.2138671875, 0.06170654296875, 0.0648193359375, 0.246337890625, 0.05133056640625, 0.265625, 0.09814453125, 0.05267333984375, 0.1783447265625, 0.2061767578125, 0.1270751953125, 0.06884765625, 0.1218261...
embed
25896153_c0
25896153
prolog
0
Title: Status variable in Prolog Problem title: Status variable in Prolog Tags: prolog Problem: Status variable in Prolog I need to code a process in which the program should run some rules base on a "Status variable", then I need to be able to change this Status variable in order to continue with the process. But I do...
Status variable in Prolog Status variable in Prolog prolog Status Prolog Status variable in Prolog I need to code a process in which the program should run some rules base on a "Status variable", then I need to be able to change this Status variable in order to continue with the process. But I do not know if there is s...
[ 0.0233154296875, 0.0198974609375, 0.010009765625, 0.0179443359375, 0.004486083984375, 0.00872802734375, -0.0016937255859375, 0.006591796875, -0.01043701171875, -0.017578125, -0.010009765625, 0.0191650390625, -0.01226806640625, 0.006805419921875, 0.0169677734375, 0.0247802734375, 0.01...
[ 56504, 77336, 23, 1250, 4867, 502, 3871, 18151, 9433, 1528, 5608, 11675, 91736, 3647, 98, 135206, 223, 19048, 47, 15549, 21342, 3714, 9844, 1884, 10, 6528, 69307 ]
[ 0.21240234375, 0.32421875, 0.045684814453125, 0.148681640625, 0.234375, 0.0975341796875, 0.0396728515625, 0.1397705078125, 0.0919189453125, 0.1004638671875, 0.028564453125, 0.06304931640625, 0.1495361328125, 0.0634765625, 0.006683349609375, 0.15185546875, 0.1580810546875, 0.0229949...
embed
66976322_c0
66976322
prolog
0
Title: prolog check uneven occurence of an element in a list Problem title: prolog check uneven occurence of an element in a list Tags: prolog, list Problem: prolog check uneven occurence of an element in a list I'm trying to make the uneven version of this prolog predicate : p([ ]). p([a, a|X]) :- p(X). This returns t...
prolog check uneven occurence of an element in a list prolog check uneven occurence of an element in a list prolog list prolog check uneven occurence of an element in a list I'm trying to make the uneven version of this prolog predicate : This returns true if the number of occurrences of "a" is even. I don't get how to...
[ -0.0047607421875, 0.0167236328125, 0.01361083984375, -0.010986328125, -0.001220703125, 0.02490234375, -0.0013580322265625, -0.0072021484375, 0.0118408203125, -0.0274658203125, 0.01092529296875, -0.00823974609375, 0.0177001953125, -0.001129150390625, 0.005401611328125, 0.001533508300781...
[ 502, 4867, 12765, 773, 1353, 74918, 6620, 12830, 23, 5303, 31577, 3249, 11389, 1653, 2063, 67, 30646, 29568, 2174, 14012, 42, 69098, 11, 83, 3853, 70270, 4358, 22936, 5 ]
[ 0.160400390625, 0.2030029296875, 0.1798095703125, 0.141357421875, 0.2337646484375, 0.1561279296875, 0.06658935546875, 0.1859130859375, 0.05029296875, 0.16796875, 0.0287322998046875, 0.043975830078125, 0.07147216796875, 0.125244140625, 0.115966796875, 0.0180511474609375, 0.14147949218...
embed
5013323_c0
5013323
prolog
0
Title: Understanding rules - false as answer Problem title: Understanding rules - false as answer Tags: prolog, prolog-toplevel Problem: Understanding rules - false as answer I am new in Prolog and I was just thinking that why this rule giving me false result after one true. likes(1,banana). likes(1,mango). test :- lik...
Understanding rules - false as answer Understanding rules - false as answer prolog prolog-toplevel Understanding Understanding rules - false as answer I am new in Prolog and I was just thinking that why this rule giving me false result after one true. likes(1,banana). likes(1,mango). test :- likes(1,banana),likes(1,man...
[ 0.023193359375, 0.021484375, -0.00897216796875, 0.02685546875, 0.0020904541015625, 0.00714111328125, 0.007781982421875, 0.01318359375, 0.00107574462890625, 0.00167083740234375, -0.012451171875, -0.018798828125, 0.003387451171875, 0.022216796875, 0.0220947265625, 0.01165771484375, 0.0...
[ 9626, 144057, 91736, 98320, 237, 35166, 502, 4867, 13784, 67919, 3525, 1250, 47644, 15400, 903, 79986, 68772, 163, 16750, 7103, 1632, 29568, 1884, 41600, 105281, 11, 669, 519, 3034, 15772, 5062, 3714, 31635, 50155 ]
[ 0.1595458984375, 0.196533203125, 0.228271484375, 0.281982421875, 0.16845703125, 0.208251953125, 0.09033203125, 0.219482421875, 0.0604248046875, 0.126220703125, 0.03582763671875, 0.133056640625, 0.032257080078125, 0.0697021484375, 0.032958984375, 0.163818359375, 0.06268310546875, 0....
embed
20925428_c0
20925428
prolog
0
Title: Filling a list recursively Problem title: Filling a list recursively Tags: prolog Problem: Filling a list recursively I want to write a rule to exhaust the database and fill a list with some items but the prolog interpreter always returns with: Out of global stack. fill(SomeParams, List) :- append(List, [NewItem...
Filling a list recursively Filling a list recursively prolog Filling SomeParams List NewItem Filling a list recursively I want to write a rule to exhaust the database and fill a list with some items but the prolog interpreter always returns with: Out of global stack. Is there a way to extend a list without doing unific...
[ -0.0025634765625, 0.00128173828125, 0.0068359375, 0.004364013671875, -0.01458740234375, 0.00130462646484375, -0.005462646484375, 0.02392578125, 0.019287109375, -0.0113525390625, 0.032470703125, -0.0238037109375, -0.004730224609375, 0.014404296875, 0.0172119140625, -0.01611328125, 0.0...
[ 140423, 214, 5303, 195625, 5844, 538, 502, 4867, 31384, 28636, 8256, 32036, 2356, 2982, 3444, 33022, 79986, 146353, 63399, 26292, 55769, 1284, 29481, 56, 11343, 30646, 13538, 111, 7964, 177261, 3917, 65042, 15490, 51, 41274 ]
[ 0.189453125, 0.051544189453125, 0.2269287109375, 0.2281494140625, 0.166748046875, 0.055816650390625, 0.137939453125, 0.2196044921875, 0.043182373046875, 0.084716796875, 0.0875244140625, 0.1888427734375, 0.10821533203125, 0.143310546875, 0.035430908203125, 0.04638671875, 0.15930175781...
embed
73751006_c0
73751006
prolog
0
Title: The meaning of (:- !,) in Prolog Problem title: The meaning of (:- !,) in Prolog Tags: prolog-cut, prolog Problem: The meaning of (:- !,) in Prolog I am a newbie to Prolog and having a hard time understanding the meaning of the cut operator, ! , in different contexts. For instance, what is the effect of it in th...
The meaning of (:- !,) in Prolog The meaning of (:- !,) in Prolog prolog-cut prolog Prolog The meaning of (:- !,) in Prolog I am a newbie to Prolog and having a hard time understanding the meaning of the cut operator, ! , in different contexts. For instance, what is the effect of it in this line here? Or how to read th...
[ 0.0247802734375, 0.00457763671875, 0.00848388671875, 0.00927734375, 0.0000743865966796875, 0.004150390625, -0.00019550323486328125, -0.005828857421875, 0.006378173828125, 0.0064697265625, -0.0037994384765625, -0.00799560546875, -0.007293701171875, -0.0166015625, 0.003753662109375, 0.00...
[ 91084, 111, 12, 9, 711, 4, 23, 1250, 4867, 581, 502, 19774, 9014, 7941, 1733, 100094, 59226, 39933, 12921, 43701, 2367, 21543, 442, 13315, 3688, 12301, 903, 47880, 14941 ]
[ 0.200439453125, 0.04071044921875, 0.1602783203125, 0.21142578125, 0.1934814453125, 0.15673828125, 0.0943603515625, 0.196044921875, 0.259033203125, 0.002899169921875, 0.1376953125, 0.1806640625, 0.0889892578125, 0.045562744140625, 0.0205841064453125, 0.09210205078125, 0.223876953125, ...
embed
30811477_c0
30811477
prolog
0
Title: What does `\+` signify as an operator in prolog? Problem title: What does `\+` signify as an operator in prolog? Tags: syntax, prolog Problem: What does `\+` signify as an operator in prolog? I have encountered the symbol \+ in prolog and am not sure as to what it signifies. I have gone through the prolog docume...
What does `\+` signify as an operator in prolog? What does `\+` signify as an operator in prolog? syntax prolog What What does `\+` signify as an operator in prolog? I have encountered the symbol \+ in prolog and am not sure as to what it signifies. I have gone through the prolog documentation and am either not being t...
[ 0.0196533203125, 0.01043701171875, 0.01953125, 0.00372314453125, -0.014892578125, 0.01190185546875, 0.0050048828125, 0.003448486328125, 0.003448486328125, -0.0026702880859375, -0.0218505859375, -0.0216064453125, 0.0052490234375, -0.004547119140625, -0.0216064453125, 0.00640869140625, ...
[ 4865, 41872, 1328, 1135, 24092, 40383, 237, 142, 39933, 23, 502, 4867, 6002, 86531, 14602, 190647, 70, 26582, 6, 9077, 2367, 442, 101717, 209806, 177953, 156672 ]
[ 0.048828125, 0.160400390625, 0.258544921875, 0.056854248046875, 0.124267578125, 0.0975341796875, 0.0594482421875, 0.046173095703125, 0.260986328125, 0.0709228515625, 0.1492919921875, 0.21484375, 0.038787841796875, 0.1273193359375, 0.0064697265625, 0.04718017578125, 0.000579833984375,...
embed
53681515_c0
53681515
prolog
0
Title: How to get specific element from list of predicates in Prolog Problem title: How to get specific element from list of predicates in Prolog Tags: prolog Problem: How to get specific element from list of predicates in Prolog ?- najveke_pojavuvanja(R). R = povik(101010, 225). ?- najveke_pojavuvanja(R),povik(X,_). R...
How to get specific element from list of predicates in Prolog How to get specific element from list of predicates in Prolog prolog list How Prolog najveke_pojavuvanja How to get specific element from list of predicates in Prolog I need to get 101010. X=101010 Help me!
[ -0.0022430419921875, -0.010498046875, 0.000324249267578125, 0.02978515625, -0.0118408203125, 0.037841796875, 0.0089111328125, 0.006561279296875, 0.0030975341796875, -0.04443359375, 0.0230712890625, -0.01458740234375, -0.0145263671875, -0.0096435546875, -0.0079345703125, 0.0004577636718...
[ 11249, 47, 2046, 29458, 12830, 1295, 5303, 1653, 2063, 1636, 1250, 4867, 23, 502, 2034, 272, 350, 71606, 1783, 10603, 3871, 21027, 76327, 1193, 33000, 963, 39527 ]
[ 0.0298919677734375, 0.027496337890625, 0.1243896484375, 0.2158203125, 0.2103271484375, 0.0804443359375, 0.13232421875, 0.154052734375, 0.19482421875, 0.0830078125, 0.164306640625, 0.2315673828125, 0.0010280609130859375, 0.11639404296875, 0.0989990234375, 0.154052734375, 0.09655761718...
embed
53575102_c0
53575102
prolog
0
Title: Message:1031 Arithmetic overflow in prolog Problem title: Message:1031 Arithmetic overflow in prolog Tags: prolog Problem: Message:1031 Arithmetic overflow in prolog predicates nondeterm s(integer,integer) nondeterm p(integer,integer,integer) clauses s(V,R) :- p(0,V,R). %,write(R),nl. p(R,0,R). p(Inc,V,R) :- I2=...
Message:1031 Arithmetic overflow in prolog Message:1031 Arithmetic overflow in prolog prolog Message:1031 Arithmetic Inc V-1 Message:1031 Arithmetic overflow in prolog predicates clauses goal gives an arithmetic overflow,,,why??
[ -0.006011962890625, 0.010498046875, -0.005889892578125, 0.0174560546875, 0.00011873245239257812, 0.00775146484375, -0.01483154296875, -0.008544921875, -0.00445556640625, -0.01025390625, 0.0230712890625, 0.00173187255859375, 0.0025787353515625, -0.01507568359375, 0.031494140625, -0.0117...
[ 48205, 15110, 5016, 1172, 8962, 282, 9523, 645, 118664, 23, 502, 4867, 8942, 310, 5759, 1653, 2063, 1636, 70731, 90, 69236, 76199, 142, 187, 434, 3038, 4767 ]
[ 0.08172607421875, 0.07098388671875, 0.229736328125, 0.061553955078125, 0.156005859375, 0.1453857421875, 0.10516357421875, 0.1407470703125, 0.27001953125, 0.042938232421875, 0.16259765625, 0.22998046875, 0.09613037109375, 0.0718994140625, 0.07635498046875, 0.11785888671875, 0.14965820...
embed
30560747_c0
30560747
prolog
0
Title: How to find the positive numbers in a list in Prolog? Problem title: How to find the positive numbers in a list in Prolog? Tags: prolog Problem: How to find the positive numbers in a list in Prolog? I want to write a code in prolog that gets a list and find its positive numbers and adds them into a new list as b...
How to find the positive numbers in a list in Prolog? How to find the positive numbers in a list in Prolog? prolog How Prolog Result How to find the positive numbers in a list in Prolog? I want to write a code in prolog that gets a list and find its positive numbers and adds them into a new list as below : How can I wr...
[ -0.00799560546875, 0.00125885009765625, 0.0272216796875, 0.0125732421875, -0.01202392578125, 0.0198974609375, 0.00299072265625, 0.01708984375, -0.0003299713134765625, -0.01239013671875, -0.00026702880859375, -0.02392578125, -0.016357421875, -0.003662109375, 0.00537109375, 0.00656127929...
[ 11249, 47, 7413, 70, 24491, 101935, 23, 5303, 1250, 4867, 502, 126684, 10, 3444, 33022, 18151, 62163, 6863, 15190, 3525, 35064 ]
[ 0.06414794921875, 0.022705078125, 0.1353759765625, 0.06317138671875, 0.2171630859375, 0.203125, 0.08868408203125, 0.20751953125, 0.157958984375, 0.235595703125, 0.1083984375, 0.1279296875, 0.0185089111328125, 0.01250457763671875, 0.05999755859375, 0.1187744140625, 0.013092041015625, ...
embed
34621610_c0
34621610
prolog
0
Title: Complement Graph - prolog Problem title: Complement Graph - prolog Tags: prolog, graph-theory, complement Problem: Complement Graph - prolog I have a question. I have a continuous undirected graph. So and I need a code in Prolog which give me a complementary graph. for example graph: edge(1,2). edge(2,3). edge(3...
Complement Graph - prolog Complement Graph - prolog prolog graph-theory complement Complement Graph Complement Graph - prolog I have a question. I have a continuous undirected graph. So and I need a code in Prolog which give me a complementary graph. for example graph: Please, help :) thanks.
[ -0.01141357421875, 0.005645751953125, 0.0169677734375, 0.004608154296875, -0.0146484375, 0.017578125, 0.00311279296875, 0.0166015625, 0.00421142578125, -0.00970458984375, -0.0223388671875, -0.01409912109375, 0.0093994140625, 0.010009765625, 0.005035400390625, 0.020263671875, -0.00022...
[ 15612, 19929, 6524, 11727, 502, 4867, 41382, 2347, 30675, 110633, 9655, 62005, 223, 51, 80581, 3871, 18151, 23, 1250, 8337, 163, 10, 88066, 27781, 30607, 4358 ]
[ 0.1016845703125, 0.2105712890625, 0.1373291015625, 0.175048828125, 0.10943603515625, 0.2064208984375, 0.2197265625, 0.1005859375, 0.049407958984375, 0.23193359375, 0.041717529296875, 0.09576416015625, 0.056549072265625, 0.019378662109375, 0.1383056640625, 0.07745361328125, 0.17614746...
embed
9005031_c0
9005031
prolog
0
Title: Satisfying a Unary Prolog predicate Problem title: Satisfying a Unary Prolog predicate Tags: prolog Problem: Satisfying a Unary Prolog predicate In order to write a procedure satisfy(P,L) which returns the list L of all terms X such that the unary predicate P(X) succeeds. I have attempted the following: satisfy(...
Satisfying a Unary Prolog predicate Satisfying a Unary Prolog predicate prolog Satisfying Unary Prolog Satisfying a Unary Prolog predicate In order to write a procedure satisfy(P,L) which returns the list L of all terms X such that the unary predicate P(X) succeeds. I have attempted the following: Am I on the right tra...
[ 0.005401611328125, 0.00164031982421875, 0.01312255859375, -0.005706787109375, -0.0225830078125, 0.01361083984375, 0.00091552734375, 0.0081787109375, -0.003173828125, -0.04296875, -0.003021240234375, -0.025390625, 0.00433349609375, -0.00823974609375, 0.00946044921875, 0.01531982421875, ...
[ 947, 1814, 18929, 4228, 1294, 1250, 4867, 1653, 2063, 67, 502, 33022, 50491, 40407, 53, 683, 4, 866, 30646, 5303, 339, 111, 756, 69407, 1193, 6044, 220, 436, 1542, 214493, 81887, 7108, 28560, 74955, 64557, 5773 ]
[ 0.0908203125, 0.153076171875, 0.164306640625, 0.1441650390625, 0.1434326171875, 0.1385498046875, 0.1915283203125, 0.1468505859375, 0.194580078125, 0.034820556640625, 0.1143798828125, 0.1156005859375, 0.1920166015625, 0.215087890625, 0.11083984375, 0.07391357421875, 0.0144500732421875...
embed
70148501_c0
70148501
prolog
0
Title: Prolog Pure Implementation of findall Problem title: Prolog Pure Implementation of findall Tags: prolog Problem: Prolog Pure Implementation of findall I'm trying to create a list of elements 1 to N. I saw this post below showing how to do that: How to append numbers in a specific range to a list in prolog But I ...
Prolog Pure Implementation of findall Prolog Pure Implementation of findall prolog Prolog Pure Implementation Prolog Pure Implementation of findall I'm trying to create a list of elements 1 to N. I saw this post below showing how to do that: How to append numbers in a specific range to a list in prolog But I need to a ...
[ -0.000232696533203125, 0.01458740234375, 0.01220703125, -0.003662109375, 0.004730224609375, 0.0277099609375, -0.00628662109375, 0.0146484375, 0.00909423828125, -0.0556640625, 0.0146484375, -0.0098876953125, -0.00970458984375, -0.0002574920654296875, 0.0224609375, 0.0096435546875, 0.0...
[ 1250, 4867, 118233, 153941, 2320, 7413, 5584, 502, 31577, 28282, 10, 5303, 80854, 106, 47, 541, 24124, 3642, 54, 11249, 114689, 71, 101935, 29458, 37457, 23, 3871, 3917, 34166, 11389, 3714 ]
[ 0.18505859375, 0.27978515625, 0.231201171875, 0.202392578125, 0.027923583984375, 0.1844482421875, 0.26025390625, 0.1549072265625, 0.07611083984375, 0.145751953125, 0.01409912109375, 0.198486328125, 0.1822509765625, 0.06500244140625, 0.13037109375, 0.120849609375, 0.0191650390625, 0...
embed
1779045_c0
1779045
prolog
0
Title: Prolog list question Problem title: Prolog list question Tags: list, prolog Problem: Prolog list question I have a database consisting of the following rules; speaks(fred [german, english, dutch]). speaks(mary [spanish, arabic, dutch]). speaks(jim [norwegian, italian, english]). speaks(sam [polish, swedish, dani...
Prolog list question Prolog list question list prolog Prolog Prolog list question I have a database consisting of the following rules; etc As part of a much larger program, how would I find out 3 people who speak the same language? Jen
[ 0.0203857421875, 0.013427734375, 0.00970458984375, 0.0076904296875, -0.0167236328125, 0.0177001953125, -0.022216796875, 0.0004329681396484375, 0.0152587890625, -0.04638671875, 0.00469970703125, -0.0247802734375, 0.00750732421875, -0.01611328125, -0.01019287109375, 0.0096435546875, 0....
[ 1250, 4867, 5303, 9655, 502, 87, 765, 10, 63399, 25632, 91736, 150679, 1528, 3642, 2806, 7413, 1810, 138, 3395, 2750, 70424, 5701, 46876, 20426 ]
[ 0.12347412109375, 0.2412109375, 0.19873046875, 0.12152099609375, 0.07965087890625, 0.00220489501953125, 0.043914794921875, 0.003780364990234375, 0.220458984375, 0.039581298828125, 0.1864013671875, 0.0244293212890625, 0.140380859375, 0.012603759765625, 0.00830841064453125, 0.13403320312...
embed
28881326_c1
28881326
prolog
1
And it yields the same result. EDIT: Seeing that my question is cryptic for some: I'd like PROLOG to give me a list of values for the variables A and B which make and(A,B) unsatisfiable EDIT2: I expect PROLOG to tell me: ?- nand(a,X). X = e ; X = b. Code signals: Goal, Prolog, is_true, is_false, I56106, Welcome, SWI-P...
And it yields the same result. EDIT: Seeing that my question is cryptic for some: I'd like PROLOG to give me a list of values for the variables A and B which make and(A,B) unsatisfiable EDIT2: I expect PROLOG to tell me: ?- nand(a,X). X = e ; X = b. Code signals: Goal, Prolog, is_true, is_false, I56106, Welcome, SWI-P...
[ 0.0164794921875, 0.00099945068359375, 0.0126953125, 0.003936767578125, -0.0189208984375, 0.007354736328125, 0.000054836273193359375, 0.005462646484375, -0.0004558563232421875, 0.00732421875, -0.00098419189453125, -0.01409912109375, 0.0030364990234375, 0.00173187255859375, -0.013854980468...
[ 3493, 442, 11180, 19388, 70, 5701, 16750, 172864, 9655, 112569, 71, 1884, 10514, 47510, 8337, 163, 5303, 142424, 77336, 7, 62, 136, 335, 3249, 284, 571, 2234, 50958, 1029, 2886, 41206, 14192, 705, 24, 2208, 11, 1542, 1193, 28, 876, 2886...
[ 0.011016845703125, 0.053619384765625, 0.06036376953125, 0.105224609375, 0.02191162109375, 0.10369873046875, 0.116455078125, 0.009185791015625, 0.0057373046875, 0.046051025390625, 0.002105712890625, 0.0753173828125, 0.1761474609375, 0.24755859375, 0.029510498046875, 0.051788330078125, ...
embed
20169862_c0
20169862
prolog
0
Title: Understanding difference lists (Prolog) Problem title: Understanding difference lists (Prolog) Tags: difference-lists, palindrome, prolog Problem: Understanding difference lists (Prolog) I'm having trouble understanding difference list, particularly in this predicate: palindrome(A, A). palindrome([_|A], A). pali...
Understanding difference lists (Prolog) Understanding difference lists (Prolog) difference-lists palindrome prolog Understanding Prolog Understanding difference lists (Prolog) I'm having trouble understanding difference list, particularly in this predicate: Could anyone help me follow what's happening?
[ 0.0257568359375, 0.00811767578125, -0.003753662109375, 0.0234375, 0.0024566650390625, 0.040283203125, -0.00897216796875, 0.005157470703125, -0.00445556640625, -0.0164794921875, 0.020263671875, -0.015869140625, 0.0015869140625, 0.0107421875, 0.011962890625, -0.003936767578125, 0.00628...
[ 9626, 144057, 60212, 5303, 7, 10752, 4867, 6562, 17923, 19, 102851, 502, 1250, 19441, 63134, 100094, 106480, 903, 1653, 2063, 191147, 35672, 4358, 28960, 2367, 123087 ]
[ 0.11517333984375, 0.1385498046875, 0.2437744140625, 0.22412109375, 0.07501220703125, 0.09796142578125, 0.2020263671875, 0.1959228515625, 0.051361083984375, 0.0239410400390625, 0.1492919921875, 0.057159423828125, 0.1112060546875, 0.0271759033203125, 0.10888671875, 0.1707763671875, 0.0...
embed
49736067_c0
49736067
prolog
0
Title: How to parse an input sentence? Problem title: How to parse an input sentence? Tags: prolog Problem: How to parse an input sentence? I am making a program which takes user input and handles that input based on the user's choice of options. Say I input a string like "hello 4 is a number, and 5 is as well". How ca...
How to parse an input sentence? How to parse an input sentence? prolog How How to parse an input sentence? I am making a program which takes user input and handles that input based on the user's choice of options. Say I input a string like "hello 4 is a number, and 5 is as well". How can I take the numbers from the str...
[ -0.01104736328125, 0.00787353515625, -0.0164794921875, 0.0252685546875, -0.01495361328125, 0.0286865234375, -0.007415771484375, 0.00958251953125, 0.000514984130859375, -0.05615234375, -0.0123291015625, -0.015625, -0.02001953125, 0.00011157989501953125, -0.00494384765625, 0.018310546875...
[ 11249, 47, 366, 184, 142, 107730, 149357, 502, 4867, 20662, 1528, 51776, 38937, 34831, 44126, 50717, 79315, 127, 13817, 201, 83, 14012, 190, 5299, 831, 5646, 101935, 3884, 23, 77336, 27781, 16487, 4527, 136, 1892 ]
[ 0.10235595703125, 0.090087890625, 0.1920166015625, 0.18505859375, 0.051177978515625, 0.2479248046875, 0.2467041015625, 0.077392578125, 0.1427001953125, 0.03839111328125, 0.10675048828125, 0.00640869140625, 0.08544921875, 0.036956787109375, 0.0615234375, 0.1434326171875, 0.15795898437...
embed
19295450_c0
19295450
prolog
0
Title: Pairing 2 Dictionaries in Prolog Problem title: Pairing 2 Dictionaries in Prolog Tags: prolog Problem: Pairing 2 Dictionaries in Prolog I need to implement dictionary pairing in prolog. This is what I've done: pp((A, B), (B,C), RES) :- RES = [(A,C)]. ?- The first result is the right answer. The question is why d...
Pairing 2 Dictionaries in Prolog Pairing 2 Dictionaries in Prolog prolog Pairing Dictionaries Prolog RES RES1 RES2 list_to_set Pairing 2 Dictionaries in Prolog I need to implement dictionary pairing in prolog. This is what I've done: Output: The first result is the right answer. The question is why does the predicate p...
[ 0.0037078857421875, -0.008056640625, 0.0003204345703125, 0.0159912109375, -0.0107421875, 0.01043701171875, -0.006805419921875, -0.002716064453125, 0.01458740234375, -0.0164794921875, 0.0084228515625, 0.0091552734375, -0.01141357421875, -0.0087890625, -0.0020294189453125, -0.00099182128...
[ 37897, 2852, 116, 67437, 23, 1250, 4867, 502, 61661, 418, 304, 5303, 188, 3509, 29479, 45, 10763, 6635, 80836, 214, 5117, 16750, 7108, 35166, 15400, 14602, 1653, 2063, 67, 32261, 63769, 313, 47, 186, 756, 70, 3789, 142424 ]
[ 0.196533203125, 0.1209716796875, 0.1414794921875, 0.2177734375, 0.011016845703125, 0.1566162109375, 0.23291015625, 0.1246337890625, 0.1070556640625, 0.030303955078125, 0.0810546875, 0.094970703125, 0.005096435546875, 0.0870361328125, 0.09173583984375, 0.034820556640625, 0.1064453125,...
embed
72296377_c0
72296377
prolog
0
Title: How can I get partition? Problem title: How can I get partition? Tags: prolog Problem: How can I get partition? I am new on prolog and I want to list the n-ary partitions of a number in prolog using backtracking. The result must be something like this: ?- nary(3,9,P). P = [9] ? ; P = [3,3,3] ? ; P = [3,3,1,1,1] ...
How can I get partition? How can I get partition? prolog How How can I get partition? I am new on prolog and I want to list the n-ary partitions of a number in prolog using backtracking. The result must be something like this: Do you have any ideas of how to do it? Lots of thanks.
[ -0.0106201171875, 0.0038604736328125, 0.007354736328125, 0.0086669921875, -0.0283203125, -0.0003604888916015625, -0.01171875, -0.0034942626953125, -0.0004787445068359375, -0.036376953125, -0.0203857421875, -0.00738525390625, -0.0269775390625, 0.00848388671875, -0.0029144287109375, -0.0...
[ 11249, 831, 87, 2046, 2878, 1363, 502, 4867, 3525, 3444, 47, 5303, 653, 6635, 5256, 14012, 17368, 4420, 125728, 214, 16750, 8110, 25647, 3642 ]
[ 0.11309814453125, 0.13330078125, 0.089599609375, 0.181640625, 0.274169921875, 0.22802734375, 0.150146484375, 0.21044921875, 0.052032470703125, 0.06427001953125, 0.031402587890625, 0.1453857421875, 0.08270263671875, 0.13037109375, 0.1483154296875, 0.10467529296875, 0.01934814453125, ...
embed
41419143_c1
41419143
prolog
1
0,0),Ls1) generatelines(N1,(20,0),(0,-34.64),Ls1) generatelines(N1,(0,-34.64),(-20,0),Ls1) generatelines(N1,(-20,0),(-60,0),Ls1). Maybe there is somebody here to help me solving this problem. thanks This is the code I have until now: - consult(library(clpfd)). generatelines(0,_,_,Ls):- !. generatelines(N, (Sx,Sy),(Ex,E...
0,0),Ls1) generatelines(N1,(20,0),(0,-34.64),Ls1) generatelines(N1,(0,-34.64),(-20,0),Ls1) generatelines(N1,(-20,0),(-60,0),Ls1). Maybe there is somebody here to help me solving this problem. thanks This is the code I have until now: - consult(library(clpfd)). generatelines(0,_,_,Ls):- !. generatelines(N, (Sx,Sy),(Ex,E...
[ -0.009033203125, 0.00154876708984375, 0.000213623046875, -0.00628662109375, -0.00836181640625, 0.0050048828125, 0.0174560546875, 0.00311279296875, 0.014892578125, -0.0262451171875, -0.0302734375, -0.00927734375, 0.004669189453125, -0.0050048828125, 0.005889892578125, 0.0020904541015625...
[ 63527, 247, 866, 7, 17727, 139392, 59801, 839, 418, 54753, 2389, 112208, 88235, 4, 11033, 77495, 13545, 83425, 176256, 3688, 4358, 3115, 2967, 5, 18151, 765, 24189, 5036, 75463, 2844, 34937, 39557, 71, 132, 711, 425, 65183, 19279, 647, 53...
[ 0.265380859375, 0.0305938720703125, 0.1123046875, 0.10498046875, 0.183837890625, 0.265625, 0.240234375, 0.1375732421875, 0.1512451171875, 0.0184326171875, 0.0865478515625, 0.1478271484375, 0.17138671875, 0.0199432373046875, 0.042022705078125, 0.10546875, 0.07232666015625, 0.0714111...
embed
16070349_c0
16070349
prolog
0
Title: How to unify numbers in prolog? Problem title: How to unify numbers in prolog? Tags: prolog Problem: How to unify numbers in prolog? In prolog, if I type 1 is 1. in the terminal, I get true, but if I try 1 is X. I get ERROR: is/2: Arguments are not sufficiently instantiated . But I expect it to tell me all the n...
How to unify numbers in prolog? How to unify numbers in prolog? prolog How ERROR Arguments How to unify numbers in prolog? In prolog, if I type 1 is 1. in the terminal, I get true, but if I try 1 is X. I get ERROR: is/2: Arguments are not sufficiently instantiated . But I expect it to tell me all the numbers that are e...
[ 0.00064849853515625, 0.01190185546875, 0.01513671875, 0.004119873046875, -0.0022735595703125, 0.005523681640625, 0.004791259765625, 0.006072998046875, 0.01422119140625, -0.019775390625, 0, -0.005706787109375, 0.010498046875, 0.0003414154052734375, 0.0022125244140625, -0.00927734375, ...
[ 11249, 51, 40383, 101935, 23, 502, 4867, 47, 151206, 24638, 112140, 360, 10644, 106, 83, 615, 33949, 29568, 9790, 1193, 12477, 959, 129980, 34648, 14, 41206, 14192, 756, 105950, 2806, 4734, 186, 831, 903, 2203 ]
[ 0.06085205078125, 0.185791015625, 0.2257080078125, 0.20068359375, 0.09716796875, 0.1875, 0.258056640625, 0.027618408203125, 0.1217041015625, 0.1009521484375, 0.24658203125, 0.031982421875, 0.1572265625, 0.1019287109375, 0.1456298828125, 0.131103515625, 0.1943359375, 0.1160888671875...
embed
30073360_c0
30073360
prolog
0
Title: Prolog - List concatenation in Trees Problem title: Prolog - List concatenation in Trees Tags: dcg, prolog Problem: Prolog - List concatenation in Trees I have to write a predicate ListInTree(T,X) which is true when T is a tree with a list in each node, and X is the concatenation of all the lists (assuming to vi...
Prolog - List concatenation in Trees Prolog - List concatenation in Trees dcg prolog Prolog List Trees Prolog - List concatenation in Trees I have to write a predicate ListInTree(T,X) which is true when T is a tree with a list in each node, and X is the concatenation of all the lists (assuming to visit in Pre-order). I...
[ 0.0272216796875, 0.0096435546875, -0.00616455078125, 0.0076904296875, -0.00113677978515625, 0.0234375, -0.021240234375, -0.003387451171875, 0.0130615234375, -0.06396484375, -0.004486083984375, -0.01031494140625, 0.0032806396484375, 0.0076904296875, 0.007080078125, 0.02294921875, 0.01...
[ 1250, 4867, 32036, 158, 4460, 33, 4804, 238, 177, 502, 90, 765, 33022, 1653, 2063, 67, 4153, 62731, 13, 618, 4, 1542, 29568, 3229, 384, 83, 53201, 678, 5303, 12638, 110, 1193, 756, 66596, 19922, 1914, 80596, 831, 28219, 4527, 195625, ...
[ 0.133056640625, 0.2047119140625, 0.1837158203125, 0.105712890625, 0.1483154296875, 0.114501953125, 0.18896484375, 0.0048828125, 0.04345703125, 0.08734130859375, 0.0255889892578125, 0.0291595458984375, 0.103271484375, 0.1356201171875, 0.1810302734375, 0.05560302734375, 0.1434326171875...
embed
47485614_c2
47485614
prolog
2
X 4th transition X=d Y=A=d write(X),write('->'),toAncestor(d,d) because Basis of the recursion says: toAncestor(A,A):-write(A). Here ends, returns true and exit. fromAncestor(A,A):-write(A). fromAncestor(X,Y):-parent(A,X),fromAncestor(A,Y),write('->'),write(X). fromAncestor(a,d). d->c->b->a true; ?- trace,fromAncestor...
X 4th transition X=d Y=A=d write(X),write('->'),toAncestor(d,d) because Basis of the recursion says: toAncestor(A,A):-write(A). Here ends, returns true and exit. fromAncestor(A,A):-write(A). fromAncestor(X,Y):-parent(A,X),fromAncestor(A,Y),write('->'),write(X). fromAncestor(a,d). d->c->b->a true; ?- trace,fromAncestor...
[ -0.00299072265625, 0.008544921875, 0.002044677734375, 0.016845703125, 0.004852294921875, 0.0027923583984375, -0.005157470703125, 0.010009765625, 0.004669189453125, -0.019775390625, 0.004302978515625, 0.00897216796875, -0.01531982421875, 0.017333984375, 0, -0.0235595703125, 0.00994873...
[ 1193, 201, 927, 149307, 1369, 71, 990, 284, 33022, 1542, 434, 18781, 103607, 25, 188, 3956, 20820, 6637, 76336, 195625, 1830, 17378, 47, 2077, 11853, 3564, 30646, 29568, 136, 82230, 1295, 1723, 99547, 161063, 104, 238, 144851, 26265, 11438,...
[ 0.1502685546875, 0.26171875, 0.205810546875, 0.2763671875, 0.0853271484375, 0.1630859375, 0.1495361328125, 0.1300048828125, 0.1826171875, 0.1553955078125, 0.06683349609375, 0.154052734375, 0.16259765625, 0.01885986328125, 0.184814453125, 0.1434326171875, 0.1766357421875, 0.06622314...
embed
10405177_c0
10405177
prolog
0
Title: What is a good website to learn prolog? Problem title: What is a good website to learn prolog? Tags: prolog Problem: What is a good website to learn prolog? I need to do a project for class in Prolog but they gave us no guidance at all in the language it self. I was reading http://kti.mff.cuni.cz/~bartak/prolog/...
What is a good website to learn prolog? What is a good website to learn prolog? prolog What What is a good website to learn prolog? I need to do a project for class in Prolog but they gave us no guidance at all in the language it self. I was reading http://kti.mff.cuni.cz/~bartak/prolog/contents.html but I am not under...
[ 0.0196533203125, 0.006317138671875, 0.0047607421875, 0.0030364990234375, 0.000377655029296875, 0.0255126953125, 0.0024871826171875, -0.00823974609375, 0.00634765625, -0.064453125, 0.00604248046875, -0.04248046875, -0.01165771484375, 0.007049560546875, 0.004730224609375, -0.010314941406...
[ 4865, 4127, 4165, 47, 30698, 502, 4867, 83, 10, 13452, 18507, 1250, 196219, 46876, 15970, 16454, 13089, 4902, 93, 1863, 1865, 3454, 69246, 7693, 100094, 11522, 97264 ]
[ 0.0287933349609375, 0.1412353515625, 0.2337646484375, 0.097412109375, 0.15771484375, 0.1939697265625, 0.287353515625, 0.043792724609375, 0.055938720703125, 0.0633544921875, 0.0655517578125, 0.158447265625, 0.090087890625, 0.137939453125, 0.05511474609375, 0.0145111083984375, 0.035705...
embed
9887704_c0
9887704
prolog
0
Title: Taking a tree and making a list Problem title: Taking a tree and making a list Tags: list, prolog, tree Problem: Taking a tree and making a list I have written a program that can take a list and change it into a tree. build_tree([X,Y],'Tree'(X,Y)) :- !. build_tree([X|Y],'Tree'(X,Z)) :- build_tree(Y, Z). If I wan...
Taking a tree and making a list Taking a tree and making a list list prolog tree Taking build_tree Tree Taking a tree and making a list I have written a program that can take a list and change it into a tree. If I want to reverse the process and take the tree and change it back into a list, how would I do this?
[ 0.02490234375, 0.024169921875, -0.00567626953125, -0.005218505859375, -0.000652313232421875, 0.0260009765625, -0.032470703125, 0.01336669921875, 0.0018768310546875, -0.03955078125, 0.01019287109375, -0.0174560546875, 0.0015716552734375, 0.01348876953125, 0.01019287109375, 0.01733398437...
[ 2561, 214, 53201, 136, 20662, 5303, 10, 502, 4867, 45367, 62600, 101344, 59121, 1528, 831, 5646, 15549, 3934, 3444, 47, 39531, 184, 9433, 4420, 3642, 2806, 54, 903 ]
[ 0.14501953125, 0.053070068359375, 0.265625, 0.08721923828125, 0.1312255859375, 0.2265625, 0.05267333984375, 0.0953369140625, 0.1602783203125, 0.1048583984375, 0.18701171875, 0.1925048828125, 0.1044921875, 0.1409912109375, 0.0207672119140625, 0.14697265625, 0.1561279296875, 0.072875...
embed
4266635_c0
4266635
prolog
0
Title: Prolog's =.. functionality Problem title: Prolog's =.. functionality Tags: prolog Problem: Prolog's =.. functionality Using Prolog's =.., is it possible to get something such as f(x),g(x) from [f,x,g,x] ? I can use H =.. [f,x,g,x] to get f(x,g,x) but this isn't what I want. Apologies if this is a silly...
Prolog's =.. functionality Prolog's =.. functionality prolog Prolog Prolog's =.. functionality Using Prolog's =.., is it possible to get something such as f(x),g(x) from [f,x,g,x] ? I can use H =.. [f,x,g,x] to get f(x,g,x) but this isn't what I want. Apologies if this is a silly question or I'm using =.. inc...
[ 0.0296630859375, 0.0020751953125, 0.019287109375, -0.002410888671875, -0.0159912109375, 0.000324249267578125, 0.01055908203125, -0.015869140625, -0.0031280517578125, -0.031494140625, 0.003631591796875, -0.018310546875, -0.00201416015625, 0.0147705078125, 0.00555419921875, -0.017578125,...
[ 1250, 4867, 3768, 2203, 5, 123309, 2481, 502, 345, 6953, 83, 442, 7722, 47, 2046, 9844, 6044, 237, 1238, 132, 425, 247, 177, 1295, 420, 4, 831, 4527, 572, 18, 3444, 18709, 12097, 9655, 17368, 214552, 4127, 64324, 73342, 111 ]
[ 0.186767578125, 0.272705078125, 0.09234619140625, 0.2437744140625, 0.093017578125, 0.1953125, 0.02764892578125, 0.1510009765625, 0.09161376953125, 0.019500732421875, 0.0380859375, 0.0291595458984375, 0.149658203125, 0.0186614990234375, 0.125, 0.056671142578125, 0.04766845703125, 0....
embed
16349912_c0
16349912
prolog
0
Title: prolog find minimum value query Problem title: prolog find minimum value query Tags: prolog, minimum Problem: prolog find minimum value query If I have the facts in following format: person(name,age). How can I write a query to find the youngest person? I have tried using recursion but I kept getting stuck in in...
prolog find minimum value query prolog find minimum value query prolog minimum prolog find minimum value query If I have the facts in following format: How can I write a query to find the youngest person? I have tried using recursion but I kept getting stuck in infinite loops. So far from all the reading I done I found...
[ 0.017578125, 0.0205078125, 0.0341796875, 0.009033203125, -0.016357421875, 0.01324462890625, -0.0031890869140625, 0.00299072265625, 0.004364013671875, -0.068359375, 0.00628662109375, 0.0024871826171875, 0.0031585693359375, -0.00933837890625, 0.021484375, 0.0023651123046875, 0.00386047...
[ 502, 4867, 7413, 15440, 34292, 41, 1294, 4263, 765, 15824, 25632, 9384, 11249, 831, 87, 33022, 10, 47, 70, 27150, 525, 3445, 37842, 17368, 195625, 1830, 1284, 93544, 20949, 179933, 54241, 13, 40956, 2060, 16454, 14037, 1810, 3871, 4527, 7...
[ 0.1334228515625, 0.22705078125, 0.188232421875, 0.248779296875, 0.21484375, 0.177978515625, 0.18310546875, 0.0272979736328125, 0.0281219482421875, 0.146728515625, 0.0643310546875, 0.14453125, 0.06976318359375, 0.06085205078125, 0.0345458984375, 0.1483154296875, 0.012603759765625, 0...
embed
59181354_c0
59181354
prolog
0
Title: why do you define a rule twice in prolog Problem title: why do you define a rule twice in prolog Tags: prolog Problem: why do you define a rule twice in prolog follows(A, B, Seen) :- not_member(B, Seen); isFriendsWith(A, B). follows(A, B, Seen) :- isFriendsWith(A, X), not_member(X, Seen), follows(X, B, [X|Seen])...
why do you define a rule twice in prolog why do you define a rule twice in prolog prolog Seen not_member why do you define a rule twice in prolog Why is the same rule defined twice. When you run the query if the first rule is true. Does it resolve.
[ 0.0133056640625, -0.004302978515625, 0.0216064453125, 0.02587890625, -0.01324462890625, -0.00689697265625, 0.009521484375, 0.0194091796875, 0.01409912109375, -0.03515625, -0.009765625, 0.007232666015625, -0.003997802734375, 0.01409912109375, 0.0185546875, 0.014892578125, 0.0218505859...
[ 15400, 61924, 79986, 186351, 23, 502, 4867, 54, 503, 33, 959, 39, 27417, 398, 10, 44084, 83, 5701, 71, 11675, 41, 1294, 5117, 29568, 103608 ]
[ 0.10125732421875, 0.2186279296875, 0.205078125, 0.23388671875, 0.05462646484375, 0.142578125, 0.2113037109375, 0.0265350341796875, 0.10992431640625, 0.11553955078125, 0.07452392578125, 0.019012451171875, 0.164306640625, 0.001987457275390625, 0.03338623046875, 0.0248565673828125, 0.01...
embed
12722758_c0
12722758
prolog
0
Title: swap function in prolog Problem title: swap function in prolog Tags: slash, swap, prolog Problem: swap function in prolog I need to replace the term A/B in prolog with B/A. A and B are variables (could be either a number, an uppercase letter, or a lowercase letter) I mean, what is on the right side of the slash ...
swap function in prolog swap function in prolog slash swap prolog swap function in prolog I need to replace the term A/B in prolog with B/A. A and B are variables (could be either a number, an uppercase letter, or a lowercase letter) I mean, what is on the right side of the slash should be on the left side and vice ver...
[ 0.015869140625, 0.0140380859375, 0.0189208984375, -0.0103759765625, -0.03173828125, -0.01019287109375, -0.0135498046875, 0.00946044921875, -0.0035858154296875, -0.006317138671875, 0.020751953125, 0.0235595703125, -0.0118408203125, -0.009521484375, 0.02197265625, -0.006378173828125, 0...
[ 202317, 32354, 23, 502, 4867, 91, 5544, 3871, 47, 91995, 13579, 62, 64, 571, 678, 335, 284, 136, 621, 77336, 52366, 14012, 1407, 58437, 31330, 92319, 2367, 98, 7108, 5609, 5608, 25737, 22925, 105274, 89536, 12988, 186, 209, 483, 18113, ...
[ 0.273193359375, 0.2044677734375, 0.0740966796875, 0.1800537109375, 0.24365234375, 0.03131103515625, 0.19189453125, 0.07562255859375, 0.0236663818359375, 0.14111328125, 0.1468505859375, 0.0933837890625, 0.2059326171875, 0.15234375, 0.050018310546875, 0.1298828125, 0.1412353515625, 0...
embed
34638807_c1
34638807
prolog
1
above code works correctly (I tested it). But with the following code for genAll, I get the Arguments are not sufficiently instantiated error. genAll(N) :- N1 is 2*N, N2 is N1+1, generate(L1,N2), valid(L1), write('['), printl(L1). printl([]) :- write(']'). printl([0|T]) :- write('0 '), printl(T). printl([1|T]) :- writ...
above code works correctly (I tested it). But with the following code for genAll, I get the Arguments are not sufficiently instantiated error. genAll(N) :- N1 is 2*N, N2 is N1+1, generate(L1,N2), valid(L1), write('['), printl(L1). printl([]) :- write(']'). printl([0|T]) :- write('0 '), printl(T). printl([1|T]) :- writ...
[ -0.01446533203125, -0.006744384765625, -0.0096435546875, -0.002899169921875, 0.0064697265625, 0.029296875, -0.017333984375, -0.0089111328125, 0.01708984375, -0.01202392578125, 0.0120849609375, 0.00799560546875, 0.0185546875, -0.00121307373046875, 0.00128173828125, -0.0166015625, 0.01...
[ 36917, 18151, 43240, 26785, 3034, 4966, 678, 25632, 9226, 43512, 112140, 7, 621, 959, 129980, 538, 34648, 14, 27686, 18499, 839, 541, 418, 83, 116, 1639, 304, 21748, 139392, 866, 10461, 4, 35604, 17727, 33022, 28412, 141, 2389, 618, 5759,...
[ 0.055572509765625, 0.1749267578125, 0.11572265625, 0.102783203125, 0.09423828125, 0.0196685791015625, 0.0201568603515625, 0.0758056640625, 0.1846923828125, 0.2666015625, 0.29345703125, 0.140625, 0.0400390625, 0.1285400390625, 0.2154541015625, 0.13037109375, 0.1715087890625, 0.15783...
embed
76466591_c2
76466591
prolog
2
Verifica, valid_input, Input, Chiede, choose_column, Column, Inserisci, Riprova, Inserisce, insert_token, Player, NewGrid, insert_token_col, NewRow, replace_first_free, RowIndex, NewRest, NewRowIndex, Sostituisce, Cell, player_won, Directions, Dir, Controlla, RowDir, ColDir, Col, check_line, Count, NextRow, NextCol, N...
Verifica, valid_input, Input, Chiede, choose_column, Column, Inserisci, Riprova, Inserisce, insert_token, Player, NewGrid, insert_token_col, NewRow, replace_first_free, RowIndex, NewRest, NewRowIndex, Sostituisce, Cell, player_won, Directions, Dir, Controlla, RowDir, ColDir, Col, check_line, Count, NextRow, NextCol, N...
[ -0.0281982421875, -0.007293701171875, 0.0223388671875, 0.050537109375, 0.02099609375, -0.00177764892578125, -0.0172119140625, -0.0115966796875, 0.00144195556640625, 0.0081787109375, 0.013671875, 0.029052734375, -0.0087890625, 0.00762939453125, -0.0322265625, 0.00982666015625, 0.03857...
[ 202484, 4, 35604, 454, 73, 7077, 360, 5585, 4196, 55076, 8447, 316, 19, 233987, 2189, 126062, 2975, 130279, 17423, 183540, 6448, 33, 60560, 2356, 19040, 12724, 434, 91995, 13448, 271, 32087, 96190, 4153, 39659, 1052, 525, 1061, 13480, 80743...
[ 0.279541015625, 0.0386962890625, 0.2646484375, 0.0172271728515625, 0.1494140625, 0.2244873046875, 0.1334228515625, 0.135009765625, 0.19140625, 0.16015625, 0.165771484375, 0.1602783203125, 0.0546875, 0.2420654296875, 0.189697265625, 0.1263427734375, 0.0341796875, 0.1968994140625, ...
embed
9134380_c0
9134380
prolog
0
Title: How to access list permutations in prolog? Problem title: How to access list permutations in prolog? Tags: list, permutation, prolog-dif, prolog Problem: How to access list permutations in prolog? I want to access list permutation and pass it as argument to other functions. This is the permutation code: takeout(...
How to access list permutations in prolog? How to access list permutations in prolog? list permutation prolog-dif prolog How How to access list permutations in prolog? I want to access list permutation and pass it as argument to other functions. This is the permutation code:
[ 0.013916015625, 0.0084228515625, 0.0234375, 0.0038909912109375, -0.00762939453125, -0.00125885009765625, -0.02734375, 0.01214599609375, 0.00799560546875, -0.035400390625, 0.004119873046875, 0.01202392578125, 0.00909423828125, -0.0019378662109375, -0.017333984375, -0.000698089599609375,...
[ 11249, 47, 17203, 5303, 117, 14311, 21094, 23, 502, 4867, 561, 22062, 428, 420, 3444, 27875, 237, 10750, 3789, 32354, 18151 ]
[ 0.08026123046875, 0.0941162109375, 0.201416015625, 0.2164306640625, 0.1580810546875, 0.2227783203125, 0.12744140625, 0.0576171875, 0.1622314453125, 0.2271728515625, 0.188232421875, 0.0843505859375, 0.08465576171875, 0.1192626953125, 0.02374267578125, 0.0858154296875, 0.03038024902343...
embed
22949338_c0
22949338
prolog
0
Title: Creating a list of lists in Prolog Problem title: Creating a list of lists in Prolog Tags: prolog, clpfd, list Problem: Creating a list of lists in Prolog I want to have a list of lists with constraints, here's my code written in SWI-Prolog: List = [L1,L2,L3], L1 = [X1, X2], L1 ins 1..4, L2 = [Y1, Y2], L2 ins 1....
Creating a list of lists in Prolog Creating a list of lists in Prolog prolog clpfd list Creating Prolog List ERROR:Type Error Creating a list of lists in Prolog I want to have a list of lists with constraints, here's my code written in SWI-Prolog: But, it gives ERROR:Type Error: integer expected .
[ 0.01312255859375, -0.01507568359375, 0.0002899169921875, 0.0028839111328125, -0.004302978515625, -0.00567626953125, -0.01220703125, 0.0023193359375, -0.007476806640625, -0.0296630859375, -0.005401611328125, -0.020263671875, 0.0152587890625, 0.0007476806640625, 0.004150390625, 0.0175781...
[ 56781, 5303, 7, 1250, 4867, 111, 23, 502, 33139, 39557, 71, 32036, 151206, 24638, 196707, 212059, 3444, 765, 678, 158, 2816, 4288, 18151, 59121, 159, 38969, 10752, 4966, 892, 1505, 84751 ]
[ 0.1240234375, 0.20751953125, 0.0611572265625, 0.1446533203125, 0.2264404296875, 0.049835205078125, 0.0167083740234375, 0.106201171875, 0.01171875, 0.041534423828125, 0.103515625, 0.1689453125, 0.1119384765625, 0.0966796875, 0.2152099609375, 0.177490234375, 0.059478759765625, 0.0112...
embed
33589855_c0
33589855
prolog
0
Title: How do I find elements that are not common in Lists using prolog? Problem title: How do I find elements that are not common in Lists using prolog? Tags: prolog Problem: How do I find elements that are not common in Lists using prolog? I have two lists [a,b,c,d] [c,d] How would I implement a predicate what would ...
How do I find elements that are not common in Lists using prolog? How do I find elements that are not common in Lists using prolog? prolog prolog How Lists How do I find elements that are not common in Lists using prolog? I have two lists How would I implement a predicate what would return the list below in Prolog. New...
[ -0.01068115234375, 0.01513671875, 0.0005035400390625, 0.0128173828125, -0.0213623046875, 0.0264892578125, 0.0029754638671875, -0.0010833740234375, 0.004180908203125, -0.01019287109375, -0.000858306884765625, -0.00592041015625, -0.000675201416015625, 0.005706787109375, 0.0074462890625, ...
[ 11249, 7413, 80854, 450, 621, 959, 39210, 32036, 7, 17368, 502, 4867, 23, 54, 87, 6626, 5303, 29479, 1653, 2063, 67, 30646, 35064, 1250, 9014, 26040, 7941, 10336, 195625, 1830 ]
[ 0.061004638671875, 0.1417236328125, 0.1846923828125, 0.0760498046875, 0.10028076171875, 0.1514892578125, 0.2083740234375, 0.2032470703125, 0.0762939453125, 0.026153564453125, 0.1429443359375, 0.2418212890625, 0.06103515625, 0.0084228515625, 0.01220703125, 0.055694580078125, 0.1516113...
embed
36436455_c1
36436455
prolog
1
Expr). expr([X|Tail], Val, Expr, Val2) :- expr(Tail, Val, Expr1, N), Val2 is X + N, append("(", Expr1, Expr2), append(Expr2, ")", Expr3), append("+", Expr3, Expr4), append(X, Expr4, Expr). expr(X, Val, Expr) :- permutation(X,Perm), expr(Perm,Val,Expr,N), N = Val. What I'm doing wrong? Is there any better solution for ...
Expr). expr([X|Tail], Val, Expr, Val2) :- expr(Tail, Val, Expr1, N), Val2 is X + N, append("(", Expr1, Expr2), append(Expr2, ")", Expr3), append("+", Expr3, Expr4), append(X, Expr4, Expr). expr(X, Val, Expr) :- permutation(X,Perm), expr(Perm,Val,Expr,N), N = Val. What I'm doing wrong? Is there any better solution for ...
[ -0.0029449462890625, 0.01348876953125, 0.01190185546875, 0.0216064453125, 0.0031585693359375, 0.0267333984375, -0.017578125, -0.003662109375, 0.02001953125, -0.047607421875, -0.0010223388671875, 0.01007080078125, 0.00726318359375, 0.002471923828125, -0.00653076171875, -0.00236511230468...
[ 60075, 42, 194, 14700, 1542, 58745, 9874, 379, 4769, 10461, 15772, 418, 541, 304, 83, 1193, 997, 114689, 19279, 10287, 21320, 1328, 363, 29557, 617, 117, 561, 22062, 15277, 39, 42272, 839, 2203, 20594, 44691, 11522, 29806, 2967, 28864, 26...
[ 0.2137451171875, 0.234619140625, 0.000946044921875, 0.199462890625, 0.1446533203125, 0.004302978515625, 0.138671875, 0.1502685546875, 0.2132568359375, 0.1400146484375, 0.017822265625, 0.046295166015625, 0.114990234375, 0.1251220703125, 0.04693603515625, 0.112060546875, 0.185791015625...
embed
349896_c0
349896
prolog
0
Title: Passing results in prolog Problem title: Passing results in prolog Tags: prolog Problem: Passing results in prolog I'm trying to make a function that has a list of lists, it multiplies the sum of the inner list with the outer list. So far i can sum a list, i've made a function sumlist([1..n],X) that will return ...
Passing results in prolog Passing results in prolog prolog Passing Passing results in prolog I'm trying to make a function that has a list of lists, it multiplies the sum of the inner list with the outer list. So far i can sum a list, i've made a function sumlist([1..n],X) that will return X = (result). But i cannot ge...
[ 0.015869140625, 0.00836181640625, -0.00701904296875, 0.0010223388671875, -0.03369140625, -0.0186767578125, 0.00897216796875, 0.00799560546875, 0.026611328125, -0.016845703125, -0.00384521484375, 0.0002956390380859375, -0.01544189453125, 0.0186767578125, -0.00909423828125, 0.01019287109...
[ 28872, 50339, 23, 502, 4867, 214, 31577, 3249, 32354, 5303, 111, 118126, 10554, 75414, 678, 1810, 56, 2060, 831, 7228, 6562, 19, 1542, 30646, 1193, 2203, 2109, 7136, 53418, 15700, 80234, 4488, 37842, 83, 136, 110, 25820 ]
[ 0.149658203125, 0.224609375, 0.0289459228515625, 0.1534423828125, 0.2266845703125, 0.05072021484375, 0.06353759765625, 0.049774169921875, 0.175048828125, 0.14892578125, 0.00421142578125, 0.1387939453125, 0.1668701171875, 0.132568359375, 0.034912109375, 0.0806884765625, 0.052612304687...
embed
65874036_c0
65874036
prolog
0
Title: How to write a prolog program for recursive subtraction Problem title: How to write a prolog program for recursive subtraction Tags: prolog, function, recursion, subtraction Problem: How to write a prolog program for recursive subtraction I want a recursive subtraction program in prolog. the scheme of the progra...
How to write a prolog program for recursive subtraction How to write a prolog program for recursive subtraction prolog function recursion subtraction How How to write a prolog program for recursive subtraction I want a recursive subtraction program in prolog. the scheme of the program is I need to convert this program ...
[ -0.0008697509765625, 0.0189208984375, 0.000080108642578125, 0.02001953125, -0.0169677734375, 0.0054931640625, -0.0031585693359375, 0.01507568359375, 0.006988525390625, -0.0299072265625, 0.005615234375, -0.0228271484375, -0.02099609375, -0.0013885498046875, 0.01043701171875, -0.01733398...
[ 11249, 47, 33022, 10, 502, 4867, 1528, 100, 195625, 5844, 1614, 117474, 32354, 1830, 3444, 150370, 3871, 96760, 3934 ]
[ 0.06219482421875, 0.046295166015625, 0.16796875, 0.049163818359375, 0.162109375, 0.2152099609375, 0.1983642578125, 0.0576171875, 0.1690673828125, 0.12017822265625, 0.1484375, 0.1602783203125, 0.09698486328125, 0.07940673828125, 0.0494384765625, 0.08135986328125, 0.046844482421875, ...
embed
4809319_c0
4809319
prolog
0
Title: Avoiding the use of cut in Prolog absolute value predicate Problem title: Avoiding the use of cut in Prolog absolute value predicate Tags: prolog-cut, prolog Problem: Avoiding the use of cut in Prolog absolute value predicate I have implemented the following function in prolog with the following code: abs2(X, Y)...
Avoiding the use of cut in Prolog absolute value predicate Avoiding the use of cut in Prolog absolute value predicate prolog-cut prolog Avoiding Prolog abs2 Avoiding the use of cut in Prolog absolute value predicate I have implemented the following function in prolog with the following code: How can I implement this fu...
[ 0.00830078125, -0.002685546875, 0.0208740234375, 0.0108642578125, -0.01177978515625, 0.01953125, 0.015625, 0.01104736328125, 0.02490234375, -0.005950927734375, 0.0111083984375, 0.0035400390625, -0.0059814453125, -0.0238037109375, 0.0218505859375, 0.009033203125, -0.004608154296875, ...
[ 84361, 86675, 4527, 59226, 1250, 4867, 89931, 34292, 1653, 2063, 502, 19774, 43719, 304, 29479, 297, 25632, 32354, 18151, 15490, 111, 24073, 3890 ]
[ 0.157958984375, 0.0625, 0.11181640625, 0.2254638671875, 0.1622314453125, 0.2425537109375, 0.129638671875, 0.1572265625, 0.154541015625, 0.1729736328125, 0.12408447265625, 0.1993408203125, 0.1434326171875, 0.1158447265625, 0.1630859375, 0.0027370452880859375, 0.043548583984375, 0.15...
embed
40723070_c0
40723070
prolog
0
Title: Count solutions in a CSP Problem title: Count solutions in a CSP Tags: clp, clpb, prolog Problem: Count solutions in a CSP I'm using prolog and I have this code: :- use_module(library(clpb)). fun(A, B, C, D, E) :- sat(A + B + C + D), sat(E), labeling([A, B, C, D, E]). If I want count all the solutions how can I ...
Count solutions in a CSP Count solutions in a CSP clp clpb prolog Count CSP use_module Count solutions in a CSP I'm using prolog and I have this code: If I want count all the solutions how can I do it? I've read about sat_count(+Expr, -Count) used in clpb but I'm not able to implement it without errors
[ 0.00738525390625, -0.000614166259765625, -0.0012969970703125, 0.016845703125, -0.016845703125, -0.00372314453125, -0.006622314453125, -0.0010223388671875, 0.017578125, -0.06640625, -0.021728515625, -0.013671875, 0.0162353515625, 0.0419921875, 0.01190185546875, -0.00958251953125, -0.0...
[ 108210, 51347, 23, 313, 9434, 33139, 254, 275, 502, 4867, 4527, 83279, 10, 18151, 4263, 3444, 54529, 756, 70, 3642, 831, 54, 442, 11736, 71013, 1328, 19279, 10287, 11814, 29479, 18499 ]
[ 0.209228515625, 0.241455078125, 0.047027587890625, 0.06689453125, 0.2154541015625, 0.0301971435546875, 0.12158203125, 0.1397705078125, 0.0806884765625, 0.14892578125, 0.089599609375, 0.0989990234375, 0.00152587890625, 0.05419921875, 0.0068359375, 0.081787109375, 0.200439453125, 0.1...
embed
64639053_c0
64639053
prolog
0
Title: Sum of list elements sums| Prolog Problem title: Sum of list elements sums| Prolog Tags: prolog Problem: Sum of list elements sums| Prolog I'm trying to sum the results of list elements sum. I have this code: adding_lists(List1, List2, Result) :- sumlist(list1, Result1), sumlist(list2, Result1), Result is Result...
Sum of list elements sums| Prolog Sum of list elements sums| Prolog prolog Sum Prolog adding_lists List1 List2 Result Result1 Result2 Sum of list elements sums| Prolog I'm trying to sum the results of list elements sum. I have this code: but it returns false, what it's the way for this sum?
[ 0.0162353515625, 0.007568359375, 0.00921630859375, 0.0189208984375, -0.023681640625, 0.0133056640625, 0.00140380859375, 0.006561279296875, 0.01434326171875, -0.019775390625, 0.0179443359375, -0.002044677734375, -0.00531005859375, 0.0279541015625, 0.005950927734375, 0.00250244140625, ...
[ 36335, 111, 5303, 80854, 10554, 1250, 4867, 502, 154107, 6562, 32036, 418, 304, 126684, 31577, 47, 50339, 18151, 1284, 30646, 98320, 3917, 100, 903 ]
[ 0.2354736328125, 0.097412109375, 0.199951171875, 0.1834716796875, 0.2286376953125, 0.14208984375, 0.20849609375, 0.0755615234375, 0.09454345703125, 0.1922607421875, 0.1590576171875, 0.0205535888671875, 0.0654296875, 0.1617431640625, 0.08831787109375, 0.017547607421875, 0.16650390625,...
embed
7862427_c0
7862427
prolog
0
Title: chess game in prolog Problem title: chess game in prolog Tags: prolog Problem: chess game in prolog For one of my courses in the University i need a chess game implemented in prolog. My homework assignment it to build/improve the AI of the game. I don't want to write the entire game from scratch,I was wondering ...
chess game in prolog chess game in prolog prolog chess game in prolog For one of my courses in the University i need a chess game implemented in prolog. My homework assignment it to build/improve the AI of the game. I don't want to write the entire game from scratch,I was wondering if there is a source code for a game ...
[ 0.02880859375, 0.01904296875, 0.0303955078125, 0.01031494140625, 0.0054931640625, 0.01092529296875, -0.024169921875, 0.006378173828125, -0.00567626953125, -0.0712890625, 0.01202392578125, 0.01556396484375, -0.01043701171875, -0.010986328125, -0.004119873046875, 0.0037841796875, 0.001...
[ 290, 7, 6712, 23, 502, 4867, 759, 132073, 12535, 3871, 29479, 5368, 18244, 95486, 45367, 128659, 38730, 3444, 33022, 64194, 206597, 149016, 31344, 18151, 46876, 313, 37223, 4904, 156202, 172554, 61687, 47, 1528, 1272, 11204 ]
[ 0.2021484375, 0.1575927734375, 0.182373046875, 0.128173828125, 0.154296875, 0.2398681640625, 0.0211181640625, 0.05615234375, 0.0577392578125, 0.07037353515625, 0.0999755859375, 0.05902099609375, 0.0816650390625, 0.059234619140625, 0.0236358642578125, 0.051971435546875, 0.128662109375...
embed
43849518_c0
43849518
prolog
0
Title: Check syntax of (C or Java code) in prolog Problem title: Check syntax of (C or Java code) in prolog Tags: swi-prolog, parsing, prolog Problem: Check syntax of (C or Java code) in prolog i am working on a project to check Syntax of a a program Written in C or java and return the Syntax is True or False the progr...
Check syntax of (C or Java code) in prolog Check syntax of (C or Java code) in prolog swi-prolog parsing prolog Check Java Hello Check syntax of (C or Java code) in prolog i am working on a project to check Syntax of a a program Written in C or java and return the Syntax is True or False the program that will check the...
[ 0.007720947265625, 0.0252685546875, 0.00067138671875, 0.0306396484375, -0.0196533203125, 0.00933837890625, 0.00173187255859375, 0.0150146484375, -0.01708984375, -0.036865234375, 0.00714111328125, 0.0022125244140625, -0.030029296875, -0.0147705078125, 0.0147705078125, -0.006256103515625...
[ 38679, 6002, 86531, 111, 441, 707, 41925, 18151, 23, 502, 4867, 2452, 3454, 366, 35378, 20697, 12765, 19010, 1528, 128538, 313, 79, 330, 30646, 83, 87599, 22225, 35064, 5443, 33022, 442, 7108, 44691, 6528 ]
[ 0.152587890625, 0.174560546875, 0.246826171875, 0.1282958984375, 0.145751953125, 0.1260986328125, 0.2252197265625, 0.2132568359375, 0.075927734375, 0.1396484375, 0.2115478515625, 0.1182861328125, 0.0999755859375, 0.022186279296875, 0.038818359375, 0.009124755859375, 0.1614990234375, ...
embed
17553350_c0
17553350
prolog
0
Title: Rearrange LIST (Ascending Order) Problem title: Rearrange LIST (Ascending Order) Tags: prolog Problem: Rearrange LIST (Ascending Order) Assume that I have a list which is incorrect sequence. How can I re-arrange the list in ascending order? E.g: dog(bull,chiwawa,lucky). And I inputted like dog(chiwawa,lucky,bull...
Rearrange LIST (Ascending Order) Rearrange LIST (Ascending Order) prolog Rearrange LIST Ascending Order Rearrange LIST (Ascending Order) Assume that I have a list which is incorrect sequence. How can I re-arrange the list in ascending order? E.g: And I inputted like dog(chiwawa,lucky,bull) . How can I rearrange them to...
[ 0.0147705078125, 0.01531982421875, -0.00994873046875, 0.0218505859375, -0.00640869140625, -0.003082275390625, -0.01055908203125, 0.0235595703125, 0.00130462646484375, 0.0108642578125, 0.01263427734375, 0.006927490234375, -0.0162353515625, 0.018798828125, 0.01324462890625, -0.013671875,...
[ 853, 147, 94250, 195977, 284, 31146, 6238, 81206, 502, 4867, 66596, 87, 765, 10, 5303, 83, 214552, 40, 944, 3956, 11249, 831, 456, 9, 70, 23, 82800, 214, 12989, 107730, 3674, 1884, 10269, 1861, 105761, 161466, 89970, 2856, 47, 24209, 72...
[ 0.10986328125, 0.188720703125, 0.26953125, 0.2412109375, 0.0178985595703125, 0.1463623046875, 0.1190185546875, 0.18359375, 0.128662109375, 0.154541015625, 0.0858154296875, 0.04119873046875, 0.0538330078125, 0.04461669921875, 0.226318359375, 0.0914306640625, 0.21337890625, 0.0249176...
embed
27353828_c0
27353828
prolog
0
Title: Argument not sufficiently instantiated Problem title: Argument not sufficiently instantiated Tags: instantiation-error, prolog Problem: Argument not sufficiently instantiated So, I just started with Prolog, and I keep getting this error of Singleton variable (Quo,C) and Argumnets not substantially instantiated. ...
Argument not sufficiently instantiated Argument not sufficiently instantiated instantiation-error prolog Argument Quo Argument not sufficiently instantiated So, I just started with Prolog, and I keep getting this error of Singleton variable (Quo,C) and Argumnets not substantially instantiated. A simple code for finding...
[ 0.0084228515625, 0.0035247802734375, -0.00018596649169921875, -0.00390625, 0.0166015625, 0.00811767578125, 0.01507568359375, -0.01092529296875, 0.00390625, -0.01483154296875, -0.0050048828125, -0.03857421875, -0.00156402587890625, -0.005615234375, 0.00225830078125, -0.026611328125, -...
[ 112140, 959, 129980, 538, 34648, 14, 188800, 502, 4867, 43851, 27686, 26859, 678, 1250, 13695, 903, 18499, 43609, 1507, 77336, 31583, 31, 441, 136, 1172, 11752, 1179, 193984, 8781, 18151, 90791, 41502, 18750, 116, 101935, 91853, 7228, 3688 ]
[ 0.2880859375, 0.1380615234375, 0.19677734375, 0.051422119140625, 0.1260986328125, 0.1153564453125, 0.1856689453125, 0.1214599609375, 0.25537109375, 0.2003173828125, 0.08056640625, 0.0293426513671875, 0.0001220703125, 0.1552734375, 0.051910400390625, 0.022735595703125, 0.2069091796875...
embed
42996782_c0
42996782
prolog
0
Title: How to get structure name? Problem title: How to get structure name? Tags: prolog, functor Problem: How to get structure name? If I have struct_name(a, b, c, d, e). , how can I get the name of the struct? In this case, it would be struct_name . Is there any specific command to do this or should I transform it in...
How to get structure name? How to get structure name? prolog functor How struct_name atom_chars How to get structure name? If I have struct_name(a, b, c, d, e). , how can I get the name of the struct? In this case, it would be struct_name . Is there any specific command to do this or should I transform it in some way i...
[ 0.0257568359375, 0.0091552734375, 0.0252685546875, 0.04296875, -0.0084228515625, 0.033935546875, 0.01019287109375, -0.000644683837890625, 0.0078125, -0.0303955078125, 0.0089111328125, 0.006988525390625, -0.0198974609375, -0.018310546875, 0.0194091796875, 0.01031494140625, -0.00872802...
[ 11249, 47, 2046, 45646, 9351, 32, 502, 4867, 7477, 18770, 36716, 11627, 34627, 454, 9254, 7, 4263, 765, 11, 876, 501, 104, 28, 3642, 831, 87, 70, 111, 442, 186, 29458, 75101, 903, 27198, 5303, 4488, 7413, 30098, 124850, 24189, 41714 ]
[ 0.09527587890625, 0.08868408203125, 0.142333984375, 0.274658203125, 0.2249755859375, 0.000457763671875, 0.1064453125, 0.2034912109375, 0.09130859375, 0.1080322265625, 0.2548828125, 0.2109375, 0.202392578125, 0.014739990234375, 0.1851806640625, 0.0204315185546875, 0.00970458984375, ...
embed
52595123_c1
52595123
prolog
1
). male(fred). male(tom). male(joe). male(jim). parent(mary, mia). parent(mary, fred). parent(mary, tina). parent(mike, mia). parent(mike, fred). parent(mike, tina). parent(liz, tom). parent(liz, joe). parent(jack, tom). parent(jack, joe). parent(mia, ann). parent(tina, sue). parent(tina, jim). parent(tom, sue). parent...
). male(fred). male(tom). male(joe). male(jim). parent(mary, mia). parent(mary, fred). parent(mary, tina). parent(mike, mia). parent(mike, fred). parent(mike, tina). parent(liz, tom). parent(liz, joe). parent(jack, tom). parent(jack, joe). parent(mia, ann). parent(tina, sue). parent(tina, jim). parent(tom, sue). parent...
[ 0.0233154296875, 0.010986328125, 0.0216064453125, 0.007354736328125, -0.007293701171875, 0.00087738037109375, -0.00537109375, 0.007080078125, 0.00421142578125, -0.05322265625, -0.006256103515625, -0.023193359375, 0.011962890625, -0.00151824951171875, 0.01495361328125, -0.00049209594726...
[ 6, 194, 11280, 132, 41347, 5928, 513, 13, 20304, 49129, 1727, 53, 4, 8132, 34836, 49864, 266, 350, 24707, 3627, 741, 135758, 7605, 3398, 5516, 29741, 15117, 42732, 594, 313, 15772, 117776, 233, 159019, 1022, 420, 425, 28864, 26073, 159, ...
[ 0.103759765625, 0.20556640625, 0.216796875, 0.06622314453125, 0.2249755859375, 0.1929931640625, 0.1319580078125, 0.0924072265625, 0.20166015625, 0.251953125, 0.1229248046875, 0.12744140625, 0.022735595703125, 0.227783203125, 0.1761474609375, 0.189453125, 0.06671142578125, 0.0686645...
embed
13866727_c0
13866727
prolog
0
Title: Converting a small regular expression to a DCG Problem title: Converting a small regular expression to a DCG Tags: dcg, prolog Problem: Converting a small regular expression to a DCG I understand that Prolog programmers typically use DCGs instead of regular expressions for matching patterns in a string. In Perl,...
Converting a small regular expression to a DCG Converting a small regular expression to a DCG dcg prolog Converting DCG Converting a small regular expression to a DCG I understand that Prolog programmers typically use DCGs instead of regular expressions for matching patterns in a string. In Perl, one might write How wo...
[ 0.004669189453125, -0.01544189453125, -0.004058837890625, 0.0167236328125, 0.0023345947265625, 0.027099609375, -0.03173828125, 0.0086669921875, 0.031982421875, -0.0208740234375, -0.0010223388671875, -0.001007080078125, -0.0174560546875, 0.00025177001953125, 0.0146484375, 0.003311157226...
[ 1657, 814, 19336, 20324, 125195, 47, 391, 56367, 104, 238, 177, 502, 4867, 10, 1250, 77848, 205794, 4527, 64457, 14858, 214, 103510, 79315, 908, 141, 13648, 33022, 11249, 2806, 5701 ]
[ 0.008514404296875, 0.1082763671875, 0.142333984375, 0.1514892578125, 0.204345703125, 0.059478759765625, 0.114013671875, 0.2308349609375, 0.023529052734375, 0.03082275390625, 0.056884765625, 0.07196044921875, 0.214111328125, 0.0040283203125, 0.111572265625, 0.1181640625, 0.03979492187...
embed
29213499_c0
29213499
prolog
0
Title: Write a Prolog program that solves the following arithmetic puzzle Problem title: Write a Prolog program that solves the following arithmetic puzzle Tags: clpfd, prolog, cryptarithmetic-puzzle Problem: Write a Prolog program that solves the following arithmetic puzzle PYP CQB CBCW ----- WXYPB where each letter r...
Write a Prolog program that solves the following arithmetic puzzle Write a Prolog program that solves the following arithmetic puzzle clpfd prolog cryptarithmetic-puzzle Write Prolog PYP CQB CBCW WXYPB Write a Prolog program that solves the following arithmetic puzzle where each letter represents a unique digit from 0-...
[ 0.00872802734375, -0.0029449462890625, -0.005828857421875, 0.0263671875, -0.027099609375, 0.031982421875, -0.01318359375, 0.004791259765625, -0.00445556640625, -0.0179443359375, -0.01416015625, -0.0174560546875, 0.01513671875, 0.01287841796875, 0.004425048828125, 0.0038909912109375, ...
[ 601, 18781, 10, 1250, 4867, 1528, 450, 86869, 7, 70, 25632, 8962, 282, 104192, 33139, 39557, 71, 502, 136791, 9523, 1766, 13894, 133, 436, 94588, 2737, 571, 76984, 129781, 143907, 57842, 7440, 12638, 31330, 33636, 36998, 153939, 1295, 757, ...
[ 0.06451416015625, 0.1209716796875, 0.02374267578125, 0.16943359375, 0.2371826171875, 0.205810546875, 0.04022216796875, 0.162841796875, 0.050048828125, 0.005279541015625, 0.146240234375, 0.114501953125, 0.0335693359375, 0.2353515625, 0.0565185546875, 0.1092529296875, 0.140869140625, ...
embed
29724299_c0
29724299
prolog
0
Title: Recursing multiple lists of lists Problem title: Recursing multiple lists of lists Tags: prolog Problem: Recursing multiple lists of lists Suppose we have a list like: [[[[a],b,c],a,b,[a,b]]] I want to recurse down the list an get [[a],b,c] or [a] for instance. Doing something like this: listsplit([H|T], H, T). ...
Recursing multiple lists of lists Recursing multiple lists of lists prolog Recursing Recursing multiple lists of lists Suppose we have a list like: [[[[a],b,c],a,b,[a,b]]] I want to recurse down the list an get [[a],b,c] or [a] for instance. Doing something like this: listsplit([H|T], H, T). when returning head I only ...
[ -0.006561279296875, 0.01806640625, -0.0103759765625, 0.0230712890625, -0.01190185546875, 0.00811767578125, 0.008544921875, -0.00726318359375, 0.0225830078125, -0.025390625, 0.01513671875, -0.014404296875, 0.0029449462890625, 0.026123046875, 0.00830078125, -0.01495361328125, 0.0179443...
[ 853, 48650, 214, 48716, 5303, 7, 111, 502, 4867, 121691, 765, 275, 238, 11, 3444, 47, 195625, 13, 7565, 70, 2046, 110527, 984, 1884, 903, 7008, 4353, 841, 58745, 618, 572, 384, 30646, 10336, 4734, 1632, 17366, 37842, 5844, 20594, 1284, ...
[ 0.1107177734375, 0.253173828125, 0.08349609375, 0.226806640625, 0.2435302734375, 0.10009765625, 0.0706787109375, 0.123046875, 0.15625, 0.0206451416015625, 0.013092041015625, 0.0477294921875, 0.0328369140625, 0.04632568359375, 0.124755859375, 0.060821533203125, 0.24658203125, 0.1517...
embed
64952561_c0
64952561
prolog
0
Title: What does this Prolog list manipulation program do? Problem title: What does this Prolog list manipulation program do? Tags: prolog Problem: What does this Prolog list manipulation program do? I'm trying to wrap my head around this: r([], _, []). r([a(H,_)|T], a(H,X), [a(H,X)|T]). r([a(H,V)|T], a(I,L), [a(H,V)|R...
What does this Prolog list manipulation program do? What does this Prolog list manipulation program do? prolog What Prolog What does this Prolog list manipulation program do? I'm trying to wrap my head around this: Example:
[ -0.0020904541015625, 0.0174560546875, 0.005645751953125, -0.0004825592041015625, -0.0142822265625, 0.011962890625, -0.0240478515625, 0.015625, 0.00005602836608886719, 0.0289306640625, 0.01007080078125, 0.00970458984375, -0.0242919921875, -0.00396728515625, 0.010498046875, 0.00155639648...
[ 4865, 14602, 903, 1250, 4867, 5303, 45258, 1363, 1528, 54, 502, 31577, 137565, 10336, 10932, 89536 ]
[ 0.10498046875, 0.1195068359375, 0.11187744140625, 0.2119140625, 0.281494140625, 0.2071533203125, 0.214599609375, 0.1044921875, 0.1898193359375, 0.13720703125, 0.1683349609375, 0.012603759765625, 0.03302001953125, 0.0243682861328125, 0.0157318115234375, 0.054656982421875 ]
embed
70326916_c2
70326916
prolog
2
II Святой'). descendant('Александр Невский', 'Ярослав II'). descendant('Андрей Городецкий', 'Александр Невский'). descendant('Дмитрий Переяславский', 'Александр Невский'). descendant('Даниил Московский', 'Александр Невский'). descendant('Юрий III Московский', 'Даниил Московский'). descendant('Иоанн I Калита', 'Даниил ...
II Святой'). descendant('Александр Невский', 'Ярослав II'). descendant('Андрей Городецкий', 'Александр Невский'). descendant('Дмитрий Переяславский', 'Александр Невский'). descendant('Даниил Московский', 'Александр Невский'). descendant('Юрий III Московский', 'Даниил Московский'). descendant('Иоанн I Калита', 'Даниил ...
[ 0.00982666015625, 0.02001953125, -0.006805419921875, 0.006256103515625, 0.00909423828125, -0.00048065185546875, 0.009033203125, 0.0098876953125, 0.00946044921875, -0.041015625, -0.006439208984375, -0.029541015625, 0.01708984375, 0.005584716796875, -0.01953125, -0.004119873046875, 0.0...
[ 1995, 98517, 312, 25, 194, 60887, 1236, 132, 10907, 198447, 1087, 652, 12635, 4, 242, 5216, 130640, 5166, 27055, 23568, 197, 1125, 188775, 123967, 983, 19711, 245, 24809, 1709, 358, 3873, 144451, 18288, 56590, 4830, 2155, 303, 87, 27877, ...
[ 0.2724609375, 0.183349609375, 0.1756591796875, 0.10760498046875, 0.102294921875, 0.26708984375, 0.175048828125, 0.046356201171875, 0.058563232421875, 0.1239013671875, 0.141845703125, 0.20751953125, 0.1446533203125, 0.0189971923828125, 0.035980224609375, 0.04119873046875, 0.1134033203...
embed
59077922_c0
59077922
prolog
0
Title: Why atom([]). is false in SWI prolog software while in GNU prolog is true? Problem title: Why atom([]). is false in SWI prolog software while in GNU prolog is true? Tags: prolog Problem: Why atom([]). is false in SWI prolog software while in GNU prolog is true? When I am using SWI prolog program and run below co...
Why atom([]). is false in SWI prolog software while in GNU prolog is true? Why atom([]). is false in SWI prolog software while in GNU prolog is true? prolog Why SWI GNU Why atom([]). is false in SWI prolog software while in GNU prolog is true? When I am using SWI prolog program and run below code the result differs fro...
[ 0.0205078125, -0.00188446044921875, 0.021484375, 0.00946044921875, -0.0267333984375, -0.0030975341796875, 0.00665283203125, 0.01214599609375, -0.015869140625, 0.0076904296875, 0.0191650390625, -0.019287109375, -0.0098876953125, -0.0155029296875, 0.00113677978515625, -0.002532958984375,...
[ 44084, 34627, 132, 1065, 98320, 159, 38969, 502, 4867, 10975, 12960, 165132, 29568, 83, 23, 17368, 1528, 11675, 35064, 18151, 16750, 129927, 130250, 7639 ]
[ 0.100341796875, 0.2578125, 0.05010986328125, 0.069580078125, 0.2320556640625, 0.0721435546875, 0.229736328125, 0.127197265625, 0.186279296875, 0.1519775390625, 0.04034423828125, 0.2091064453125, 0.15869140625, 0.0211944580078125, 0.01507568359375, 0.004364013671875, 0.07440185546875,...
embed
9858906_c0
9858906
prolog
0
Title: how to print the whole route Problem title: how to print the whole route Tags: dcg, prolog Problem: how to print the whole route Such as for go(a, d). i want it to print the route as well such as route a, route b, route, c and route d door(a, b). door(b, c). door(c, d). door(b, e). door(e, f). door(e, g). go(Fro...
how to print the whole route how to print the whole route dcg prolog FromRoom ToRoom NextRoom how to print the whole route Such as for go(a, d). i want it to print the route as well such as route a, route b, route, c and route d
[ 0.00787353515625, -0.0010223388671875, 0.004486083984375, 0.0164794921875, -0.003143310546875, 0.01483154296875, -0.02099609375, -0.009033203125, -0.00011157989501953125, -0.047119140625, -0.0081787109375, -0.0208740234375, -0.0235595703125, 0.0042724609375, -0.0223388671875, 0.0081787...
[ 3642, 47, 28412, 70, 28271, 36439, 104, 238, 177, 502, 4867, 28090, 12724, 306, 717, 4997, 100, 738, 11, 3444, 5299 ]
[ 0.0655517578125, 0.065185546875, 0.234375, 0.0977783203125, 0.2080078125, 0.267822265625, 0.09002685546875, 0.0246124267578125, 0.134765625, 0.135986328125, 0.20166015625, 0.09197998046875, 0.1536865234375, 0.0858154296875, 0.10479736328125, 0.120361328125, 0.0076751708984375, 0.13...
embed
45378236_c0
45378236
prolog
0
Title: Prolog Rules (Predicates) Problem title: Prolog Rules (Predicates) Tags: prolog Problem: Prolog Rules (Predicates) I'm new in Prolog SWI can you help me to solve this. Suppose have a database with predicates likes (person1, person2) and hobbies (person1, hobby). Now, how can I design a rule such that the system ...
Prolog Rules (Predicates) Prolog Rules (Predicates) prolog Prolog Rules Predicates Prolog Rules (Predicates) I'm new in Prolog SWI can you help me to solve this. Suppose have a database with predicates likes (person1, person2) and hobbies (person1, hobby). Now, how can I design a rule such that the system answers that ...
[ 0.006134033203125, 0.01348876953125, -0.0040283203125, 0.0299072265625, -0.004058837890625, 0.0233154296875, -0.002349853515625, 0.00115203857421875, 0.0034637451171875, -0.032958984375, -0.00347900390625, -0.006927490234375, 0.0025177001953125, 0.0167236328125, 0.01422119140625, 0.009...
[ 1250, 4867, 139118, 7, 19273, 18601, 1636, 502, 7145, 2063, 3525, 159, 38969, 831, 4358, 86869, 903, 121691, 765, 63399, 1653, 1884, 30816, 418, 3445, 10461, 136, 739, 22155, 63645, 3642, 4331, 79986, 6044, 5426, 35166, 6626, 3395, 5701, ...
[ 0.1826171875, 0.25634765625, 0.210693359375, 0.05914306640625, 0.1483154296875, 0.1964111328125, 0.1083984375, 0.135009765625, 0.149169921875, 0.2261962890625, 0.09832763671875, 0.06036376953125, 0.173095703125, 0.0293731689453125, 0.0748291015625, 0.1199951171875, 0.00946044921875, ...
embed
41544281_c1
41544281
prolog
1
)), X3 is X2 +R1*cos((Phi1-240)*pi/180), Y3 is Y2 +R1*sin((Phi1+240)*pi/180), X4 is X2+(X2-Sx), Y4 is Y2+(Y2-Sy), Ls=[ [(Sx,Sy),(X2,Y2)], [(X2,Y2),(X3,Y3)], [(X3,Y3),(X4,Y4)], [(X4,Y4),(Ex,Ey)]]. next_level_segments([[(Sx,Sy),(Ex,Ey)]|E],[X|RLs]):- segments([(Sx,Sy),(Ex,Ey)],X), next_level_segments(E,RLs). next_level_s...
)), X3 is X2 +R1*cos((Phi1-240)*pi/180), Y3 is Y2 +R1*sin((Phi1+240)*pi/180), X4 is X2+(X2-Sx), Y4 is Y2+(Y2-Sy), Ls=[ [(Sx,Sy),(X2,Y2)], [(X2,Y2),(X3,Y3)], [(X3,Y3),(X4,Y4)], [(X4,Y4),(Ex,Ey)]]. next_level_segments([[(Sx,Sy),(Ex,Ey)]|E],[X|RLs]):- segments([(Sx,Sy),(Ex,Ey)],X), next_level_segments(E,RLs). next_level_s...
[ -0.00836181640625, 0.0036773681640625, -0.01177978515625, 0.00058746337890625, 0.0036163330078125, 0.006072998046875, -0.022705078125, 0.0023193359375, 0.0208740234375, 0.00518798828125, 0.0027923583984375, 0.00151824951171875, 0.00128173828125, 0.0036468505859375, 0.00347900390625, 0....
[ 78960, 1193, 363, 83, 304, 997, 1052, 418, 7840, 132, 45689, 14, 72789, 125136, 1434, 64, 39425, 247, 990, 1596, 54651, 617, 1328, 1542, 18504, 425, 1723, 65183, 339, 7, 1369, 294, 10461, 21320, 29557, 19279, 53, 86245, 5, 11737, 67919,...
[ 0.146484375, 0.1549072265625, 0.215087890625, 0.1343994140625, 0.1575927734375, 0.126220703125, 0.05340576171875, 0.050048828125, 0.1837158203125, 0.035736083984375, 0.0396728515625, 0.0302276611328125, 0.01165771484375, 0.1385498046875, 0.1702880859375, 0.0140380859375, 0.1868896484...
embed
27086303_c0
27086303
prolog
0
Title: Converting a user input string to list Problem title: Converting a user input string to list Tags: swi-prolog, prolog Problem: Converting a user input string to list Is there any way in which I can convert a string to list separated by spaces.The string has to be entered by the user. Suppose How are you today ? ...
Converting a user input string to list Converting a user input string to list swi-prolog prolog Converting How Converting a user input string to list Is there any way in which I can convert a string to list separated by spaces.The string has to be entered by the user. Suppose How are you today ? is the string entered b...
[ -0.00994873046875, -0.0076904296875, -0.00885009765625, 0.01190185546875, -0.00701904296875, 0.0230712890625, -0.0091552734375, -0.009765625, -0.00274658203125, -0.0498046875, 0.01019287109375, -0.000904083251953125, -0.028076171875, 0.005615234375, -0.0113525390625, 0.014404296875, ...
[ 1657, 814, 1916, 38937, 107730, 79315, 47, 5303, 91, 2452, 3454, 4867, 502, 11249, 3917, 831, 96760, 84797, 390, 32628, 1556, 30957, 621, 398, 18925, 70, 3444, 4343, 442, 23, 339, 81826, 1046, 53927, 160351, 54 ]
[ 0.0628662109375, 0.1605224609375, 0.0572509765625, 0.218994140625, 0.244873046875, 0.285888671875, 0.1292724609375, 0.25830078125, 0.03985595703125, 0.1966552734375, 0.124755859375, 0.1971435546875, 0.109375, 0.1243896484375, 0.03338623046875, 0.03521728515625, 0.20556640625, 0.132...
embed
9837241_c0
9837241
prolog
0
Title: how to concatenate string and number in prolog? Problem title: how to concatenate string and number in prolog? Tags: prolog, concatenation Problem: how to concatenate string and number in prolog? let's say Expr = 1+2. and I want this Expr in parenthesis, what should I do in order to have this unification? NewExp...
how to concatenate string and number in prolog? how to concatenate string and number in prolog? prolog concatenation Expr NewExpr how to concatenate string and number in prolog? let's say Expr = 1+2. and I want this Expr in parenthesis, what should I do in order to have this unification? How can I make this NewExpr out...
[ 0.0037994384765625, -0.01123046875, 0.00921630859375, 0.0250244140625, -0.0033111572265625, 0.0230712890625, -0.00787353515625, 0.0146484375, 0.0159912109375, -0.039306640625, -0.00469970703125, -0.0296630859375, -0.0031585693359375, -0.013427734375, 0.01068115234375, -0.00087738037109...
[ 3642, 47, 158, 33478, 76, 67, 79315, 136, 14012, 23, 502, 4867, 4460, 33, 60075, 42, 2356, 19279, 10287, 2203, 106, 54651, 3444, 903, 49129, 160291, 51, 41274, 1810, 183114, 55923, 142477 ]
[ 0.07513427734375, 0.040618896484375, 0.1251220703125, 0.1912841796875, 0.1416015625, 0.0804443359375, 0.234619140625, 0.1669921875, 0.1934814453125, 0.063232421875, 0.1787109375, 0.2330322265625, 0.1651611328125, 0.10888671875, 0.1463623046875, 0.1575927734375, 0.1094970703125, 0.0...
embed
40363004_c2
40363004
prolog
2
nonvar(Ctx); nonvar(F), ?=(Args, CtxArgs)), (Ctx =.. [F|CtxArgs])), when((nonvar(Left);nonvar(Args)), append(Left, Code signals: How, Prolog, term_ctx_subterm, Term, CtxHole, SubTerm, Ctx-Hole, Ctx, Hole, Args, Left, Right, CtxArgs, Ctx1-Hole, Ctx1, test1, test2, HERE, test3, term_ctx_subterm_v2, ERROR, Arguments, _765...
nonvar(Ctx); nonvar(F), ?=(Args, CtxArgs)), (Ctx =.. [F|CtxArgs])), when((nonvar(Left);nonvar(Args)), append(Left, Code signals: How, Prolog, term_ctx_subterm, Term, CtxHole, SubTerm, Ctx-Hole, Ctx, Hole, Args, Left, Right, CtxArgs, Ctx1-Hole, Ctx1, test1, test2, HERE, test3, term_ctx_subterm_v2, ERROR, Arguments, _765...
[ 0.01336669921875, 0.0045166015625, 0.0162353515625, -0.00738525390625, 0.0018463134765625, -0.00445556640625, -0.01904296875, 0.0079345703125, 0.00604248046875, -0.0068359375, 0.01318359375, 0.01251220703125, -0.0012359619140625, 0.017333984375, 0.009521484375, 0.0091552734375, 0.003...
[ 351, 1961, 441, 18, 425, 3142, 919, 705, 1369, 7614, 9405, 313, 2203, 3229, 6431, 5267, 2480, 114689, 71, 28864, 26073, 11249, 1250, 4867, 13579, 15390, 22144, 32166, 2994, 39, 113251, 13, 8273, 35484, 9, 14355, 1172, 636, 90911, 20268, ...
[ 0.19384765625, 0.268310546875, 0.0897216796875, 0.14208984375, 0.26318359375, 0.037384033203125, 0.156005859375, 0.1243896484375, 0.04052734375, 0.151123046875, 0.1951904296875, 0.04876708984375, 0.0897216796875, 0.10357666015625, 0.166748046875, 0.05975341796875, 0.1441650390625, ...
embed
10252431_c0
10252431
prolog
0
Title: Using SWI-Prolog Interactively - Output Taken off Problem title: Using SWI-Prolog Interactively - Output Taken off Tags: prolog, interactive-mode Problem: Using SWI-Prolog Interactively - Output Taken off I'm using SWI-Prolog interactively. When I run my query, I get a prefix of the output and the rest is taken ...
Using SWI-Prolog Interactively - Output Taken off Using SWI-Prolog Interactively - Output Taken off prolog interactive-mode Using SWI-Prolog Interactively Output Taken Using SWI-Prolog Interactively - Output Taken off I'm using SWI-Prolog interactively. When I run my query, I get a prefix of the output and the rest is ...
[ 0.0052490234375, -0.00015926361083984375, 0.0177001953125, 0.01531982421875, -0.02880859375, -0.016357421875, 0.00171661376953125, 0.00933837890625, -0.0005340576171875, -0.0281982421875, -0.0021209716796875, 0.020263671875, -0.00994873046875, -0.0009918212890625, 0.02197265625, -0.006...
[ 345, 6953, 159, 38969, 9, 10752, 4867, 5337, 71232, 13538, 7077, 2561, 33, 5773, 502, 212398, 61170, 17368, 11675, 41, 2046, 183114, 111, 140992, 10588, 39958, 79466, 79315, 153, 58745, 27, 903, 3638, 4420, 30022, 1528 ]
[ 0.052642822265625, 0.0235443115234375, 0.0986328125, 0.251708984375, 0.033203125, 0.1536865234375, 0.2216796875, 0.1279296875, 0.1259765625, 0.151611328125, 0.1243896484375, 0.08953857421875, 0.0755615234375, 0.2281494140625, 0.1209716796875, 0.2008056640625, 0.126220703125, 0.1083...
embed
28954733_c0
28954733
prolog
0
Title: Check if a fact has been entered into a Prolog knowledge base Problem title: Check if a fact has been entered into a Prolog knowledge base Tags: prolog Problem: Check if a fact has been entered into a Prolog knowledge base If I have a query that's executing of the form: human(mary) How can I find out if mary has...
Check if a fact has been entered into a Prolog knowledge base Check if a fact has been entered into a Prolog knowledge base prolog Check Prolog Check if a fact has been entered into a Prolog knowledge base If I have a query that's executing of the form: How can I find out if mary has ever been entered in any other pred...
[ 0.04736328125, 0.01214599609375, 0.0216064453125, 0.022705078125, 0.0009002685546875, 0.016357421875, 0.00421142578125, 0.004638671875, -0.00811767578125, -0.044921875, 0.00885009765625, -0.0111083984375, -0.009033203125, 0.006195068359375, 0.004852294921875, 0.0216064453125, 0.02087...
[ 38679, 2174, 15824, 1556, 2809, 30957, 297, 3934, 10, 1250, 4867, 51359, 3647, 502, 41, 1294, 71924, 3173, 11249, 831, 7413, 1810, 1108, 53, 17669, 3789, 1653, 2063, 198395, 14192, 51592, 23213, 8108 ]
[ 0.190185546875, 0.117431640625, 0.1888427734375, 0.12451171875, 0.11083984375, 0.179443359375, 0.0986328125, 0.113037109375, 0.0675048828125, 0.1590576171875, 0.2462158203125, 0.1602783203125, 0.209716796875, 0.1273193359375, 0.0843505859375, 0.10498046875, 0.0914306640625, 0.06542...
embed
49802189_c0
49802189
prolog
0
Title: Ask Prolog for predicates of an argument Problem title: Ask Prolog for predicates of an argument Tags: prolog Problem: Ask Prolog for predicates of an argument Say, we have some facts like musician(sokrates). philosopher(sokrates). two_legged(sokrates). dead(sokrates). Is there any way to ask Prolog for predicat...
Ask Prolog for predicates of an argument Ask Prolog for predicates of an argument prolog Ask Prolog two_legged Ask Prolog for predicates of an argument Say, we have some facts like Is there any way to ask Prolog for predicates that are valid for 'sokrates' like: I looked for some syntax to do that, but I can't imagine ...
[ 0.0166015625, -0.0089111328125, 0.0024871826171875, 0.004638671875, -0.01239013671875, 0.02685546875, 0.01519775390625, 0.00592041015625, 0.003021240234375, -0.06494140625, 0.00848388671875, 0.002532958984375, -0.0223388671875, 0.007415771484375, -0.0034942626953125, 0.003082275390625,...
[ 105219, 1250, 4867, 100, 1653, 2063, 1636, 111, 10750, 502, 6626, 106464, 642, 765, 3060, 15824, 1884, 2499, 3917, 47, 26458, 35604, 7, 26072, 6002, 86531, 54, 450, 28987, 29806 ]
[ 0.1624755859375, 0.1727294921875, 0.241943359375, 0.09869384765625, 0.18896484375, 0.2130126953125, 0.1431884765625, 0.06195068359375, 0.2342529296875, 0.1041259765625, 0.0841064453125, 0.1383056640625, 0.011566162109375, 0.051422119140625, 0.00390625, 0.1766357421875, 0.072937011718...
embed
50787646_c0
50787646
prolog
0
Title: Why this Prolog code doesn't work like expected Problem title: Why this Prolog code doesn't work like expected Tags: prolog Problem: Why this Prolog code doesn't work like expected This seems kind of silly but this Prolog code returns true for all values from 1 to 100. While it should be only for 55 nu...
Why this Prolog code doesn't work like expected Why this Prolog code doesn't work like expected prolog Why Prolog Why this Prolog code doesn't work like expected This seems kind of silly but this Prolog code returns true for all values from 1 to 100. While it should be only for 55 numbers . Can somebody expla...
[ -0.020263671875, 0.006866455078125, 0.0021209716796875, -0.006103515625, 0.01104736328125, 0.0291748046875, 0.00482177734375, -0.000690460205078125, -0.0086669921875, -0.0220947265625, 0.002593994140625, -0.002410888671875, -0.01416015625, -0.01177978515625, 0.01104736328125, 0.0084838...
[ 44084, 903, 1250, 4867, 18151, 22027, 3768, 18, 4488, 1884, 84751, 502, 37202, 8562, 78, 12097, 1284, 30646, 7, 29568, 100, 756, 142424, 1295, 106, 47, 805, 51404, 5608, 4734, 4859, 101935, 4171, 176256, 73342, 444, 132283, 3688 ]
[ 0.136962890625, 0.08056640625, 0.1903076171875, 0.248046875, 0.2064208984375, 0.12451171875, 0.0733642578125, 0.125732421875, 0.1282958984375, 0.1324462890625, 0.1436767578125, 0.1397705078125, 0.10302734375, 0.054534912109375, 0.0227508544921875, 0.1114501953125, 0.02044677734375, ...
embed
51144689_c0
51144689
prolog
0
Title: Prolog: sum the elements of a list Problem title: Prolog: sum the elements of a list Tags: prolog Problem: Prolog: sum the elements of a list I am very new to prolog and I'm trying to sum the elements of a list. So far, I have this: sum([],_,_). %base case sum([H|T], Y, _X):- X2 is H + Y, sum(T,X2,X2). testing w...
Prolog: sum the elements of a list Prolog: sum the elements of a list prolog Prolog Prolog: sum the elements of a list I am very new to prolog and I'm trying to sum the elements of a list. So far, I have this: testing with sum([1,2,3,4], 0, X) results in an error, but I'm not sure what's wrong with this code. Could som...
[ 0.0147705078125, 0.01422119140625, 0.0118408203125, 0.007537841796875, -0.0194091796875, 0.02490234375, -0.0128173828125, 0.01171875, 0.0164794921875, -0.01171875, 0.01220703125, -0.028564453125, -0.0140380859375, -0.0054931640625, 0.003082275390625, 0.017333984375, 0.015380859375, ...
[ 1250, 4867, 10554, 70, 80854, 111, 5303, 12, 10, 502, 4552, 3525, 47, 31577, 2060, 903, 134234, 678, 132, 1065, 133063, 82449, 268, 757, 1193, 50339, 23, 18499, 9077, 44691, 18151, 6275, 48225 ]
[ 0.18701171875, 0.250732421875, 0.25244140625, 0.0673828125, 0.2447509765625, 0.0814208984375, 0.21484375, 0.0323486328125, 0.01226806640625, 0.162841796875, 0.0267486572265625, 0.091796875, 0.021697998046875, 0.07958984375, 0.0548095703125, 0.024169921875, 0.1864013671875, 0.071838...
embed
72259548_c0
72259548
prolog
0
Title: Same predicate with same number of arguments, but different arguments type Problem title: Same predicate with same number of arguments, but different arguments type Tags: prolog Problem: Same predicate with same number of arguments, but different arguments type I want to write a predicate that takes these argume...
Same predicate with same number of arguments, but different arguments type Same predicate with same number of arguments, but different arguments type prolog Same Same predicate with same number of arguments, but different arguments type I want to write a predicate that takes these arguments: predicate(X, Y). predicate(...
[ 0.004486083984375, 0.0126953125, -0.0096435546875, 0.001007080078125, -0.0084228515625, 0.01611328125, -0.0023956298828125, 0.010986328125, 0.00057220458984375, -0.0299072265625, 0.014404296875, -0.01318359375, -0.0020599365234375, -0.01495361328125, -0.00124359130859375, 0.01214599609...
[ 99908, 1653, 2063, 67, 678, 5701, 14012, 10750, 7, 1284, 12921, 10644, 502, 4867, 3444, 33022, 51776, 6097, 1542, 990, 1723, 567, 4233, 2271, 171859, 34627, 80836, 7722, 54, 903, 4734, 390, 103510, 14858, 214 ]
[ 0.152587890625, 0.19970703125, 0.23046875, 0.1328125, 0.049652099609375, 0.11669921875, 0.1099853515625, 0.237060546875, 0.0379638671875, 0.056976318359375, 0.1944580078125, 0.1688232421875, 0.129150390625, 0.183837890625, 0.09014892578125, 0.1298828125, 0.0968017578125, 0.05096435...
embed
5555159_c0
5555159
prolog
0
Title: Fast two dimensional array in prolog Problem title: Fast two dimensional array in prolog Tags: prolog, arrays Problem: Fast two dimensional array in prolog What is the most efficient way to represent two dimensional arrays in prolog? I thought of one long list or list of lists, but they have linear access time w...
Fast two dimensional array in prolog Fast two dimensional array in prolog prolog arrays Fast Fast two dimensional array in prolog What is the most efficient way to represent two dimensional arrays in prolog? I thought of one long list or list of lists, but they have linear access time which seems to be too slow for my ...
[ 0.0361328125, -0.013671875, 0.000732421875, -0.0020904541015625, 0.001373291015625, -0.0030059814453125, -0.005645751953125, 0.01324462890625, 0.00141143798828125, -0.00872802734375, 0.0299072265625, 0.021728515625, -0.0147705078125, -0.006072998046875, -0.0223388671875, 0.000724792480...
[ 25290, 6626, 157955, 10298, 53, 23, 502, 4867, 2684, 93766, 3917, 47, 33636, 4778, 17569, 5303, 192617, 17203, 1733, 5792, 72803, 2967, 43542, 29806, 23755, 29479 ]
[ 0.1414794921875, 0.1219482421875, 0.1680908203125, 0.1812744140625, 0.08984375, 0.011566162109375, 0.1275634765625, 0.2127685546875, 0.052490234375, 0.1600341796875, 0.0462646484375, 0.006805419921875, 0.20654296875, 0.133544921875, 0.0234527587890625, 0.120849609375, 0.1099853515625...
embed
39256100_c0
39256100
prolog
0
Title: In SWI-Prolog, what does the number of logical inferences measure? Problem title: In SWI-Prolog, what does the number of logical inferences measure? Tags: prolog, swi-prolog Problem: In SWI-Prolog, what does the number of logical inferences measure? In SWI-Prolog, what does the number of logical inferences measu...
In SWI-Prolog, what does the number of logical inferences measure? In SWI-Prolog, what does the number of logical inferences measure? prolog swi-prolog SWI-Prolog In SWI-Prolog, what does the number of logical inferences measure? In SWI-Prolog, what does the number of logical inferences measure? Is it the number of res...
[ 0.020263671875, 0.01318359375, 0.00714111328125, 0.02685546875, -0.01177978515625, 0.0059814453125, 0.00113677978515625, -0.01080322265625, 0.0022735595703125, -0.031494140625, -0.0179443359375, -0.0147705078125, -0.0013275146484375, 0.012939453125, 0.0150146484375, 0.0291748046875, ...
[ 360, 159, 38969, 9, 10752, 4867, 14012, 111, 62775, 289, 53498, 69098, 72350, 502, 91, 2452, 3454, 2367, 158839, 51, 41274, 34735, 60892, 208124 ]
[ 0.04034423828125, 0.09564208984375, 0.2425537109375, 0.071533203125, 0.180908203125, 0.2049560546875, 0.11669921875, 0.001678466796875, 0.210693359375, 0.1444091796875, 0.2294921875, 0.1217041015625, 0.191650390625, 0.1168212890625, 0.036102294921875, 0.174560546875, 0.1385498046875,...
embed
16673185_c0
16673185
prolog
0
Title: How does Prolog handle this query Problem title: How does Prolog handle this query Tags: head, list, logic, prolog, tail Problem: How does Prolog handle this query Considering the following definition: my_append([], L, L). my_append([H|T], L, [H|NewTail]):- my_append(T, L, NewTail). And a possible usage, and its...
How does Prolog handle this query How does Prolog handle this query head list logic prolog tail How Prolog my_append NewTail How does Prolog handle this query Considering the following definition: And a possible usage, and its output: Could someone help me understanding how does it work?
[ 0.0189208984375, 0.01953125, 0.0157470703125, 0.0118408203125, -0.006622314453125, 0.015869140625, 0.00341796875, 0.008056640625, 0.0244140625, -0.033447265625, 0.0294189453125, -0.0303955078125, -0.00823974609375, 0.01318359375, 0.0201416015625, -0.0091552734375, 0.0257568359375, ...
[ 11249, 14602, 1250, 4867, 34831, 903, 41, 1294, 10336, 5303, 62775, 502, 46741, 759, 9007, 3611, 2356, 9874, 379, 80934, 7722, 127689, 6863, 140992, 4358, 100094, 3642, 442, 4488 ]
[ 0.0679931640625, 0.08642578125, 0.20068359375, 0.28466796875, 0.187255859375, 0.141845703125, 0.151123046875, 0.12457275390625, 0.1253662109375, 0.1610107421875, 0.1507568359375, 0.151611328125, 0.2474365234375, 0.14990234375, 0.07879638671875, 0.12359619140625, 0.157470703125, 0.1...
embed
43822949_c0
43822949
prolog
0
Title: Assign a list to a list in Prolog Problem title: Assign a list to a list in Prolog Tags: prolog Problem: Assign a list to a list in Prolog So, what I'm trying to do is something like: If(something) List=List2; Where List can be any list (with or without args in it), and List2 is a List with Lists inside. But in ...
Assign a list to a list in Prolog Assign a list to a list in Prolog prolog Assign Prolog List List2 Assign a list to a list in Prolog So, what I'm trying to do is something like: Where List can be any list (with or without args in it), and List2 is a List with Lists inside. But in Prolog , I can't use the is statement,...
[ 0.0145263671875, -0.0031280517578125, 0.0078125, 0.019287109375, -0.0189208984375, -0.003326416015625, -0.007293701171875, 0.0242919921875, 0.0220947265625, 0.01171875, 0.0186767578125, 0.00836181640625, 0.016357421875, 0.01275634765625, -0.00457763671875, -0.0034942626953125, 0.0157...
[ 1301, 31304, 5303, 47, 1250, 4867, 23, 502, 32036, 304, 31577, 78662, 831, 186, 2499, 15490, 79459, 83, 678, 46132, 18, 4527, 70, 63805, 2203, 54, 17368, 38969, 10752 ]
[ 0.069091796875, 0.2685546875, 0.247314453125, 0.1351318359375, 0.1683349609375, 0.254150390625, 0.03985595703125, 0.12548828125, 0.1822509765625, 0.1837158203125, 0.038726806640625, 0.017974853515625, 0.06915283203125, 0.044677734375, 0.048004150390625, 0.0374755859375, 0.11071777343...
embed
17629364_c0
17629364
prolog
0
Title: Path in Prolog with open and consult Problem title: Path in Prolog with open and consult Tags: prolog Problem: Path in Prolog with open and consult I use consult with path of file that i would load. For example: consult('C:/path1/path2/myfile.pl). And i use this method also for open : open('C:/path1/path2/path3/...
Path in Prolog with open and consult Path in Prolog with open and consult prolog Path Prolog path1 path2 myfile.pl path3 fileopen.pl Stream Path in Prolog with open and consult I use consult with path of file that i would load. For example: And i use this method also for open : Is there a method for indicate only the n...
[ 0.04052734375, -0.0028839111328125, 0.0021514892578125, 0.0244140625, -0.01025390625, -0.00433349609375, -0.0068359375, 0.003875732421875, -0.00038909912109375, -0.0703125, -0.0023651123046875, 0.011474609375, -0.013671875, 0.000629425048828125, 0.013916015625, -0.02294921875, 0.0114...
[ 108421, 23, 1250, 4867, 678, 9803, 136, 75463, 502, 60875, 418, 304, 759, 29822, 2424, 363, 11435, 59636, 115061, 87, 4527, 111, 17, 2806, 72367, 5, 55300, 117414, 4734, 9351 ]
[ 0.240478515625, 0.0968017578125, 0.158935546875, 0.2474365234375, 0.07623291015625, 0.1903076171875, 0.120849609375, 0.2548828125, 0.1124267578125, 0.2021484375, 0.0377197265625, 0.038360595703125, 0.0546875, 0.1497802734375, 0.0911865234375, 0.03521728515625, 0.156005859375, 0.199...
embed
377912_c0
377912
prolog
0
Title: Prolog - outputting a list? Problem title: Prolog - outputting a list? Tags: prolog Problem: Prolog - outputting a list? I have the function sublist(_,[_],_) :- !. sublist(X,[Y|T],Z) :- R is X - Y, sublist(X,T,[R|Z]). an example call is sublist(2,[1,2,3],Z) . At the end of execution it just gives me 'yes', but i...
Prolog - outputting a list? Prolog - outputting a list? prolog Prolog Prolog - outputting a list? I have the function an example call is sublist(2,[1,2,3],Z) . At the end of execution it just gives me 'yes', but i'd like to see the contents of Z. I know it's something simple as i have other instructions that do similar...
[ 0.00537109375, 0.0005645751953125, 0.018310546875, -0.0038604736328125, -0.0238037109375, 0.028076171875, 0.00164031982421875, 0.004608154296875, 0.00144195556640625, 0.0303955078125, 0.01092529296875, -0.01153564453125, -0.00604248046875, -0.0052490234375, -0.00116729736328125, 0.0172...
[ 1250, 4867, 140992, 1916, 5303, 10, 502, 32354, 27781, 11782, 1614, 6562, 54753, 133063, 96386, 1511, 3564, 71924, 76199, 163, 63736, 71, 1884, 47, 1957, 10941, 111, 567, 8781, 167934, 903, 18, 20697 ]
[ 0.17724609375, 0.271240234375, 0.210693359375, 0.097900390625, 0.2313232421875, 0.06109619140625, 0.115478515625, 0.1470947265625, 0.1776123046875, 0.1175537109375, 0.1868896484375, 0.2122802734375, 0.067138671875, 0.05926513671875, 0.047332763671875, 0.12841796875, 0.0916748046875, ...
embed
13771516_c1
13771516
prolog
1
B 2182'). And I've been able to write the following, that gives me the schedule for a lecturer: schedule(Lecturer, X, Y, Z) :- ctl(X, Y, Z), lc(Lecturer, X). But now I'm trying to write a rule to find when do Dr. Jones and Dr. Smith teach at the same time. Any ideas? Code signals: How, Smith, Algorithms, Jones, Models,...
B 2182'). And I've been able to write the following, that gives me the schedule for a lecturer: schedule(Lecturer, X, Y, Z) :- ctl(X, Y, Z), lc(Lecturer, X). But now I'm trying to write a rule to find when do Dr. Jones and Dr. Smith teach at the same time. Any ideas? Code signals: How, Smith, Algorithms, Jones, Models,...
[ -0.004638671875, 0.0146484375, -0.01470947265625, 0.031982421875, -0.033935546875, -0.01043701171875, -0.00946044921875, -0.00823974609375, 0.006866455078125, -0.044189453125, -0.0228271484375, -0.0101318359375, 0.006195068359375, -0.0098876953125, -0.009765625, 0.0177001953125, 0.00...
[ 335, 952, 12012, 25, 194, 272, 2809, 19048, 33022, 25632, 76199, 163, 80889, 100, 59619, 42, 5267, 238, 87643, 1193, 990, 567, 108963, 141, 1542, 4966, 5036, 31577, 79986, 7413, 3229, 1773, 29304, 136, 37700, 94957, 5701, 1733, 25647, 288...
[ 0.152587890625, 0.101806640625, 0.1981201171875, 0.0740966796875, 0.0217437744140625, 0.008941650390625, 0.022491455078125, 0.0689697265625, 0.0892333984375, 0.0721435546875, 0.02923583984375, 0.011932373046875, 0.275146484375, 0.035888671875, 0.1649169921875, 0.1099853515625, 0.0503...
embed
67189148_c0
67189148
prolog
0
Title: Prolog double every other number in list Problem title: Prolog double every other number in list Tags: list, prolog Problem: Prolog double every other number in list Hey guys I am trying to double every other number, but keep the rest of the list the same. Ex. [2,2,2,2] -> [2,4,2,4] Here is what I have so far: d...
Prolog double every other number in list Prolog double every other number in list list prolog Prolog double_elements Doubled_list Prolog double every other number in list Hey guys I am trying to double every other number, but keep the rest of the list the same. Ex. [2,2,2,2] -> [2,4,2,4] Here is what I have so far: All...
[ -0.00180816650390625, 0.0081787109375, 0.0081787109375, 0.002777099609375, 0.00433349609375, 0.054443359375, -0.0284423828125, 0.005645751953125, 0.013427734375, -0.0162353515625, 0.020751953125, -0.029541015625, -0.015625, -0.0022125244140625, 0.005767822265625, 0.023193359375, 0.01...
[ 1250, 4867, 41929, 11907, 3789, 14012, 23, 5303, 502, 62766, 107172, 71, 6562, 51484, 31577, 13695, 10588, 5701, 5, 5443, 304, 90173, 33079, 617, 2060, 3164, 442, 30646, 83, 124093 ]
[ 0.1605224609375, 0.224609375, 0.2109375, 0.1153564453125, 0.142578125, 0.169189453125, 0.04449462890625, 0.1904296875, 0.1026611328125, 0.18896484375, 0.1676025390625, 0.05401611328125, 0.2091064453125, 0.0233306884765625, 0.0926513671875, 0.1014404296875, 0.03253173828125, 0.07922...
embed
43355442_c0
43355442
prolog
0
Title: How to create a clock in console? Problem title: How to create a clock in console? Tags: prolog Problem: How to create a clock in console? I have to create something like this . I know how to write the current time but I do not know how to update it. My guess is that I should use the now predicate? Still, I have...
How to create a clock in console? How to create a clock in console? prolog How How to create a clock in console? I have to create something like this . I know how to write the current time but I do not know how to update it. My guess is that I should use the now predicate? Still, I have no idea how to update the output...
[ -0.00127410888671875, 0.004364013671875, 0.01422119140625, -0.00115203857421875, -0.004119873046875, -0.0074462890625, -0.00130462646484375, 0.00994873046875, 0.0025787353515625, -0.042236328125, -0.01446533203125, -0.00811767578125, 0.00823974609375, -0.0169677734375, 0.0103759765625, ...
[ 11249, 47, 28282, 10, 501, 21135, 23, 130250, 502, 4867, 87, 765, 9844, 1884, 903, 3714, 3642, 33022, 43581, 1733, 959, 28350, 442, 57767, 5608, 4527, 70, 5036, 1653, 2063, 67, 110, 6528, 140992, 1202, 37842, 41872, 275, 154109, 6305, 8...
[ 0.101318359375, 0.109619140625, 0.2015380859375, 0.105224609375, 0.1705322265625, 0.29345703125, 0.1376953125, 0.277587890625, 0.0919189453125, 0.14599609375, 0.0008544921875, 0.035888671875, 0.04595947265625, 0.0980224609375, 0.06787109375, 0.049591064453125, 0.0557861328125, 0.11...
embed
53358631_c0
53358631
prolog
0
Title: Prolog: ERROR: Undefined procedure: getval/2 How to use getval? Problem title: Prolog: ERROR: Undefined procedure: getval/2 How to use getval? Tags: prolog Problem: Prolog: ERROR: Undefined procedure: getval/2 How to use getval? I set the values of two variables in the first two lines of my code. However when I ...
Prolog: ERROR: Undefined procedure: getval/2 How to use getval? Prolog: ERROR: Undefined procedure: getval/2 How to use getval? prolog Prolog ERROR Undefined How Prolog: ERROR: Undefined procedure: getval/2 How to use getval? I set the values of two variables in the first two lines of my code. However when I want to re...
[ 0.019775390625, 0.000965118408203125, 0.0164794921875, 0.01446533203125, 0.00537109375, 0.00384521484375, -0.002105712890625, 0.0191650390625, 0.0032958984375, -0.02001953125, 0.0006256103515625, 0.01434326171875, -0.011474609375, -0.0228271484375, 0.0029754638671875, -0.01092529296875...
[ 1250, 4867, 151206, 24638, 79912, 5983, 297, 50491, 2046, 1405, 12477, 4527, 11249, 502, 5423, 142424, 6626, 77336, 5117, 124519, 18151, 456, 3996, 18499, 44691 ]
[ 0.1435546875, 0.212890625, 0.125, 0.13818359375, 0.1173095703125, 0.19384765625, 0.028656005859375, 0.1995849609375, 0.150146484375, 0.2841796875, 0.24267578125, 0.1180419921875, 0.0123291015625, 0.1097412109375, 0.130859375, 0.115478515625, 0.09222412109375, 0.1978759765625, 0.0...
embed
8379270_c0
8379270
prolog
0
Title: prolog Searching the Lists Problem title: prolog Searching the Lists Tags: prolog, dcg Problem: prolog Searching the Lists I am trying to compare the lists. Given function(List1,List2) and List1 has length N and List 2 has length M and N>M. I want to check if any permutation of List2 happens to be the first M ch...
prolog Searching the Lists prolog Searching the Lists prolog dcg Searching Lists prolog Searching the Lists I am trying to compare the lists. Given function(List1,List2) and List1 has length N and List 2 has length M and N>M. I want to check if any permutation of List2 happens to be the first M characters of List1. eg,...
[ 0.0072021484375, 0.0108642578125, 0.00171661376953125, 0.0164794921875, -0.00567626953125, 0.0191650390625, 0.00110626220703125, 0.00168609619140625, 0.01507568359375, -0.0255126953125, 0.00927734375, 0.01385498046875, -0.00171661376953125, 0.00946044921875, -0.010498046875, 0.00817871...
[ 502, 4867, 33086, 214, 70, 32036, 7, 104, 238, 177, 31577, 69101, 5303, 19, 32354, 154663, 418, 10461, 140909, 541, 116, 276, 2740, 594, 3444, 12765, 2174, 2499, 117, 561, 22062, 304, 96276, 5117, 124850, 5608, 29568, 98320 ]
[ 0.1646728515625, 0.1966552734375, 0.1766357421875, 0.1036376953125, 0.07928466796875, 0.2298583984375, 0.0266876220703125, 0.02410888671875, 0.055633544921875, 0.1031494140625, 0.042694091796875, 0.1817626953125, 0.19287109375, 0.004913330078125, 0.12744140625, 0.1575927734375, 0.050...
embed
26472158_c0
26472158
prolog
0
Title: Prolog exercise, identical lists Problem title: Prolog exercise, identical lists Tags: prolog Problem: Prolog exercise, identical lists I found following exercise on www.learnprolognow.org, I tried solving it but haven't been able to: Write a predicate swap12(List1,List2) which checks whether List1 is identical ...
Prolog exercise, identical lists Prolog exercise, identical lists prolog Prolog swap12 List1 List2 Prolog exercise, identical lists I found following exercise on www.learnprolognow.org, I tried solving it but haven't been able to: Write a predicate swap12(List1,List2) which checks whether List1 is identical to List2 , ...
[ 0.004974365234375, 0.00970458984375, 0.005126953125, 0.01495361328125, 0.00689697265625, 0.0025787353515625, -0.02001953125, -0.005157470703125, 0.000843048095703125, 0.0027313232421875, 0.03173828125, 0.026611328125, -0.005218505859375, 0.000888824462890625, -0.00146484375, 0.01104736...
[ 1250, 4867, 81979, 31943, 6827, 5303, 502, 202317, 1530, 32036, 418, 304, 25632, 14071, 35613, 3115, 38246, 18781, 1653, 2063, 67, 154663, 10461, 12765, 36766, 47, 40494, 5117, 6626, 80854, 121122, 5036 ]
[ 0.16796875, 0.1925048828125, 0.1658935546875, 0.1705322265625, 0.1328125, 0.185302734375, 0.093017578125, 0.1986083984375, 0.177734375, 0.1600341796875, 0.07537841796875, 0.15185546875, 0.0146331787109375, 0.064453125, 0.0648193359375, 0.05535888671875, 0.0023193359375, 0.023956298...
embed
63825388_c0
63825388
prolog
0
Title: How do i print a line with input using a line/2 predicate in prolog Problem title: How do i print a line with input using a line/2 predicate in prolog Tags: prolog Problem: How do i print a line with input using a line/2 predicate in prolog ive came this far. im new to prolog and i want to make simple figures. i...
How do i print a line with input using a line/2 predicate in prolog How do i print a line with input using a line/2 predicate in prolog prolog a How XXXXXXXX How do i print a line with input using a line/2 predicate in prolog ive came this far. im new to prolog and i want to make simple figures. i want to make the inpu...
[ -0.0146484375, -0.006927490234375, 0.00543212890625, 0.01055908203125, -0.00848388671875, 0.0274658203125, 0.0166015625, 0.006134033203125, -0.00799560546875, -0.016845703125, 0.0028076171875, -0.00193023681640625, -0.0068359375, -0.0026397705078125, -0.0012664794921875, 0.000184059143...
[ 11249, 54, 17, 28412, 13315, 678, 107730, 17368, 12477, 1653, 2063, 67, 502, 4867, 10, 23, 205378, 272, 21449, 903, 2060, 566, 3444, 3249, 8781, 26366, 1884 ]
[ 0.0650634765625, 0.038543701171875, 0.0738525390625, 0.2154541015625, 0.17919921875, 0.0941162109375, 0.209716796875, 0.06396484375, 0.22900390625, 0.151123046875, 0.1868896484375, 0.07244873046875, 0.137939453125, 0.197265625, 0.012908935546875, 0.04925537109375, 0.1116943359375, ...
embed
46715355_c0
46715355
prolog
0
Title: Prolog - multiplying by addition Problem title: Prolog - multiplying by addition Tags: prolog Problem: Prolog - multiplying by addition I need simple fuction in SWI-prolog which multiplying by addition. Something like m(X,Y,Z) where for example X=5, Z=3 <==> 5*3. Y is result: Y=5, Y=10, Y=15 [stop]. I was thinki...
Prolog - multiplying by addition Prolog - multiplying by addition prolog Prolog Z-1 Prolog - multiplying by addition I need simple fuction in SWI-prolog which multiplying by addition. Something like m(X,Y,Z) where for example X=5, Z=3 <==> 5*3. Y is result: Y=5, Y=10, Y=15 [stop]. I was thinking about something like th...
[ -0.01324462890625, 0.0194091796875, 0.0140380859375, 0.0235595703125, -0.016357421875, -0.0023651123046875, -0.00750732421875, 0.00946044921875, 0.01519775390625, -0.04443359375, 0.0216064453125, -0.011474609375, -0.023193359375, -0.01458740234375, 0.016845703125, 0.00927734375, 0.02...
[ 1250, 4867, 6024, 62479, 390, 66044, 214, 502, 567, 5759, 3871, 8781, 5639, 10763, 23, 159, 38969, 3454, 347, 1542, 1723, 1511, 1193, 114997, 4, 76067, 69112, 190, 1639, 363, 990, 16750, 963, 1837, 19111, 47644, 1884, 11343, 30646, 8710, ...
[ 0.1640625, 0.233154296875, 0.0802001953125, 0.141357421875, 0.1043701171875, 0.19189453125, 0.03289794921875, 0.118408203125, 0.1365966796875, 0.09881591796875, 0.1112060546875, 0.1644287109375, 0.14599609375, 0.171630859375, 0.013458251953125, 0.063232421875, 0.221923828125, 0.143...
embed
48911069_c0
48911069
prolog
0
Title: How do I convert a string into ascii in amzi! prolog? Problem title: How do I convert a string into ascii in amzi! prolog? Tags: amzi-prolog, prolog, ascii Problem: How do I convert a string into ascii in amzi! prolog? so I tried converting strings into ascii with the name/2 and char_codes/2 and so on, but I kee...
How do I convert a string into ascii in amzi! prolog? How do I convert a string into ascii in amzi! prolog? amzi-prolog prolog ascii How How do I convert a string into ascii in amzi! prolog? so I tried converting strings into ascii with the name/2 and char_codes/2 and so on, but I keep getting things like [0w0061,0w006...
[ 0.01104736328125, -0.0216064453125, 0.015869140625, 0.033203125, -0.01220703125, 0.002410888671875, -0.0033111572265625, 0.00946044921875, 0.00125885009765625, -0.000492095947265625, 0.0262451171875, -0.02734375, -0.003875732421875, 0.0172119140625, -0.01318359375, -0.01239013671875, ...
[ 11249, 54, 87, 96760, 10, 79315, 3934, 237, 26506, 23, 444, 708, 38, 502, 4867, 3454, 37842, 214, 678, 9351, 12477, 136, 21441, 40899, 1284, 13695, 20949, 8966, 1884, 2389, 434, 159343, 206808, 216969, 96386, 27781, 3444, 70, 176377, 5303...
[ 0.097412109375, 0.06201171875, 0.06341552734375, 0.1986083984375, 0.070068359375, 0.27685546875, 0.1522216796875, 0.1513671875, 0.2890625, 0.08563232421875, 0.1549072265625, 0.2491455078125, 0.113037109375, 0.174072265625, 0.217529296875, 0.140380859375, 0.0552978515625, 0.00479125...
embed
40411184_c1
40411184
prolog
1
.9). gpa(4.0). course_crh(gpa(X)):- write('Please Enter gpa'), read(X), (( X>=2.0, X=<4.0)-> write('Max 18 credit are allowed');write('Less than 18 credit hrs allowed'). What i want that calling on course_crh() it print the message to enter gpa then check in condition and print the final message depends on my input val...
.9). gpa(4.0). course_crh(gpa(X)):- write('Please Enter gpa'), read(X), (( X>=2.0, X=<4.0)-> write('Max 18 credit are allowed');write('Less than 18 credit hrs allowed'). What i want that calling on course_crh() it print the message to enter gpa then check in condition and print the final message depends on my input val...
[ -0.008056640625, 0.00726318359375, -0.01806640625, 0.00634765625, 0.01434326171875, 0.017578125, 0.000881195068359375, 0.019287109375, 0.00933837890625, -0.0016632080078125, 0.0054931640625, -0.034423828125, -0.0084228515625, -0.00616455078125, -0.0008697509765625, 0.00982666015625, ...
[ 1126, 706, 763, 151152, 15411, 23150, 127, 177, 1542, 33022, 238159, 60816, 12301, 1193, 73011, 71346, 543, 22299, 621, 107003, 18781, 68016, 10979, 3444, 450, 159029, 132, 28412, 70, 26008, 30957, 12765, 23, 35431, 2704, 56566, 98, 107730, ...
[ 0.1512451171875, 0.1275634765625, 0.18017578125, 0.1883544921875, 0.1649169921875, 0.1087646484375, 0.1834716796875, 0.05670166015625, 0.055877685546875, 0.1092529296875, 0.12060546875, 0.21826171875, 0.1292724609375, 0.048583984375, 0.125, 0.109375, 0.1234130859375, 0.184204101562...
embed
32783691_c0
32783691
prolog
0
Title: Prolog - writing a predicate that calculates the sum of two atomic statements Problem title: Prolog - writing a predicate that calculates the sum of two atomic statements Tags: prolog Problem: Prolog - writing a predicate that calculates the sum of two atomic statements Suppose I have: person(bob,50) . person(jo...
Prolog - writing a predicate that calculates the sum of two atomic statements Prolog - writing a predicate that calculates the sum of two atomic statements prolog Prolog Prolog - writing a predicate that calculates the sum of two atomic statements Suppose I have: And I want to write a predicate called 'totalAge(A)' tha...
[ 0.0184326171875, 0.01483154296875, 0.0045166015625, 0.033447265625, -0.0137939453125, 0.021240234375, -0.00787353515625, 0.017822265625, 0.00872802734375, -0.039306640625, 0.01043701171875, 0.0091552734375, -0.00634765625, 0.001953125, 0.02880859375, -0.00078582763671875, 0.001884460...
[ 1250, 4867, 32562, 1653, 2063, 67, 450, 74481, 10554, 6626, 34627, 1771, 63805, 20, 1636, 111, 502, 121691, 765, 3444, 33022, 35839, 188, 1803, 284, 429, 132, 3622, 34292, 62, 15044, 11249, 20594 ]
[ 0.1944580078125, 0.271484375, 0.15966796875, 0.1666259765625, 0.21142578125, 0.1239013671875, 0.012664794921875, 0.2056884765625, 0.2003173828125, 0.1409912109375, 0.154541015625, 0.0250091552734375, 0.1923828125, 0.0059814453125, 0.0224609375, 0.011749267578125, 0.1551513671875, 0...
embed