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
53234048_c0
53234048
prolog
0
Title: How to save even numbers in Prolog? Problem title: How to save even numbers in Prolog? Tags: prolog Problem: How to save even numbers in Prolog? I tried to keep even numbers by removing the odd but there seams to be a problem. keepeven([], []). keepeven([X|Xs], Even) :- 0 is X mod 2, keepeven(Xs, [Even|X]). And ...
How to save even numbers in Prolog? How to save even numbers in Prolog? prolog How Prolog Even How to save even numbers in Prolog? I tried to keep even numbers by removing the odd but there seams to be a problem. And I tried: I'm missing something. :/ I should get from But I just get fail.
[ 0.01251220703125, 0.0252685546875, 0.026611328125, -0.020751953125, 0.01165771484375, 0.030029296875, -0.00092315673828125, 0.00665283203125, 0.014892578125, -0.017822265625, 0.0030670166015625, 0.00046539306640625, -0.01019287109375, 0.009765625, 0.017822265625, 0.00848388671875, 0....
[ 11249, 47, 30098, 3853, 101935, 23, 1250, 4867, 502, 31267, 37842, 13695, 49146, 70270, 40, 8256, 2967, 132283, 2046, 1295, 35782 ]
[ 0.049163818359375, 0.046112060546875, 0.1759033203125, 0.195068359375, 0.201416015625, 0.064208984375, 0.1507568359375, 0.23388671875, 0.08099365234375, 0.1466064453125, 0.0187530517578125, 0.1063232421875, 0.008575439453125, 0.1357421875, 0.027374267578125, 0.09735107421875, 0.02157...
embed
32968148_c0
32968148
prolog
0
Title: Why throw an exception in Prolog instead a simple fail? Problem title: Why throw an exception in Prolog instead a simple fail? Tags: negation-as-failure, prolog, exception Problem: Why throw an exception in Prolog instead a simple fail? I'm programming in Prolog and sometimes I want to get a fail but instead I g...
Why throw an exception in Prolog instead a simple fail? Why throw an exception in Prolog instead a simple fail? negation-as-failure prolog exception Why Prolog Why throw an exception in Prolog instead a simple fail? I'm programming in Prolog and sometimes I want to get a fail but instead I get an exception, which I can...
[ 0.015625, 0.0181884765625, 0.003082275390625, -0.00677490234375, 0.00836181640625, 0.011474609375, 0.01312255859375, 0.006866455078125, -0.00445556640625, -0.01507568359375, -0.00384521484375, 0.006072998046875, -0.00860595703125, -0.00726318359375, 0.01348876953125, -0.0145263671875, ...
[ 44084, 104250, 131527, 23, 1250, 4867, 64457, 8781, 35782, 108, 125682, 162, 120540, 3408, 502, 56037, 68018, 3444, 28219, 15400, 60212, 69427, 18, 71924, 1653, 2063, 42593, 37534, 132283 ]
[ 0.0953369140625, 0.144775390625, 0.206787109375, 0.027069091796875, 0.14990234375, 0.2261962890625, 0.0869140625, 0.1412353515625, 0.16845703125, 0.1546630859375, 0.1458740234375, 0.072265625, 0.1002197265625, 0.041748046875, 0.0972900390625, 0.0711669921875, 0.0284881591796875, 0....
embed
15978946_c0
15978946
prolog
0
Title: Parsing an integer in a string? Problem title: Parsing an integer in a string? Tags: prolog, dcg Problem: Parsing an integer in a string? I was going through this example on DCG integer(I) --> digit(D0), digits(D), { number_codes(I, [D0|D]) }. digit(D) --> [D], { code_type(D, digit) }. But this example parses an...
Parsing an integer in a string? Parsing an integer in a string? prolog dcg Parsing number_codes code_type Parsing an integer in a string? I was going through this example on DCG But this example parses an integer only if it's in the beginning of the string (because digit(D0) fails is D0 is not a number code). How do I ...
[ -0.01220703125, -0.010009765625, 0.0093994140625, 0.043212890625, -0.006805419921875, 0.0291748046875, 0.004486083984375, -0.01031494140625, 0.01190185546875, -0.0234375, -0.0263671875, -0.01556396484375, -0.0322265625, 0.02783203125, 0.0142822265625, -0.00335693359375, 0.00102233886...
[ 2392, 6953, 892, 1505, 23, 79315, 502, 4867, 104, 238, 177, 14012, 40899, 18151, 50986, 142, 27781, 391, 56367, 366, 5908, 4734, 2174, 86595, 153939, 397, 77495, 35782, 7, 2389, 83, 959, 1672, 151107, 2055, 48636, 112, 420 ]
[ 0.1654052734375, 0.12451171875, 0.14208984375, 0.1573486328125, 0.07861328125, 0.259521484375, 0.044891357421875, 0.11767578125, 0.009796142578125, 0.005859375, 0.0704345703125, 0.113525390625, 0.158447265625, 0.179443359375, 0.1527099609375, 0.009429931640625, 0.0972900390625, 0.0...
embed
28788291_c0
28788291
prolog
0
Title: Prolog Length of Evens in a List Problem title: Prolog Length of Evens in a List Tags: prolog, variable-length, sublist, recursion, list Problem: Prolog Length of Evens in a List I am a Prolog beginner, and I have the following length function: mylen([H|Lc],N) :- mylen(Lc,M),N is M+1. mylen([],0). I would like t...
Prolog Length of Evens in a List Prolog Length of Evens in a List prolog variable-length sublist recursion list Prolog Length Evens List Prolog Length of Evens in a List I am a Prolog beginner, and I have the following length function: I would like to know if there's an easy way to query the interpreter to calculate th...
[ -0.005401611328125, 0.027099609375, 0.01446533203125, 0.003692626953125, 0.004913330078125, 0.020751953125, 0.00823974609375, 0.0218505859375, 0.01397705078125, -0.054931640625, 0.00787353515625, -0.006622314453125, 0.00872802734375, 0.0087890625, 0.021240234375, 0.0279541015625, -0....
[ 1250, 4867, 77554, 927, 111, 31267, 7, 23, 32036, 10, 502, 77336, 23986, 1614, 6562, 195625, 5303, 9842, 1679, 25632, 140909, 32354, 1884, 3714, 23468, 3917, 41, 1294, 29481, 56, 74481, 3853, 1672, 158661, 214, 541, 4734, 98, 14012, 22362...
[ 0.172119140625, 0.2281494140625, 0.1728515625, 0.1087646484375, 0.0572509765625, 0.26220703125, 0.154296875, 0.0654296875, 0.220703125, 0.02294921875, 0.1387939453125, 0.1610107421875, 0.092529296875, 0.10888671875, 0.168701171875, 0.1263427734375, 0.190673828125, 0.0194091796875, ...
embed
14171024_c0
14171024
prolog
0
Title: Solving a logical exercise in prolog Problem title: Solving a logical exercise in prolog Tags: prolog Problem: Solving a logical exercise in prolog I'm trying to study Prolog, and i have some troubles with logical exercise. Bob, Tom, Sam have a job in bank as an accountant, cashier and manager. Here are some mor...
Solving a logical exercise in prolog Solving a logical exercise in prolog prolog Solving Solving a logical exercise in prolog I'm trying to study Prolog, and i have some troubles with logical exercise.
[ 0.0322265625, 0.007080078125, -0.01385498046875, 0.0233154296875, -0.02294921875, 0.0216064453125, -0.027099609375, 0.0308837890625, 0.003082275390625, -0.01953125, -0.0048828125, 0.0078125, -0.01318359375, 0.02734375, -0.004608154296875, 0.0174560546875, 0.013916015625, 0.00288391...
[ 6678, 6496, 62775, 289, 81979, 23, 502, 4867, 10, 31577, 35187, 1250, 63134 ]
[ 0.11151123046875, 0.08935546875, 0.171142578125, 0.1033935546875, 0.173583984375, 0.073974609375, 0.134521484375, 0.2117919921875, 0.02862548828125, 0.01800537109375, 0.01611328125, 0.0914306640625, 0.06036376953125 ]
embed
79072993_c2
79072993
prolog
2
ULT, Your, Wordsa, File, alice.txt, Stream, string_to_list, InputString, CharList, Convert, replace_punctuation, ResultCharList, Replace, ProcessedString, split_string, Words, Split, Prolog, Warning, tmpvqkpw9ac.pl:2, Singleton, Redefined, Previously, tmp_fd7iu9n.pl:2, tmpvqkpw9ac.pl:9, ERROR, Project, Gutenberg, Trace...
ULT, Your, Wordsa, File, alice.txt, Stream, string_to_list, InputString, CharList, Convert, replace_punctuation, ResultCharList, Replace, ProcessedString, split_string, Words, Split, Prolog, Warning, tmpvqkpw9ac.pl:2, Singleton, Redefined, Previously, tmp_fd7iu9n.pl:2, tmpvqkpw9ac.pl:9, ERROR, Project, Gutenberg, Trace...
[ 0.01507568359375, -0.0007476806640625, -0.01043701171875, 0.01324462890625, -0.005615234375, 0.00506591796875, 0.00958251953125, -0.018310546875, 0.011962890625, -0.032470703125, 0.0157470703125, 0.01214599609375, -0.004058837890625, 0.0162353515625, 0.013916015625, 0.0037994384765625,...
[ 6, 82643, 4, 14804, 22543, 433, 42724, 10, 13348, 5, 124326, 115061, 79315, 188, 6562, 360, 7077, 71713, 214, 21656, 154663, 1657, 11549, 91995, 210431, 34, 2320, 126684, 84068, 853, 23935, 123996, 65450, 91693, 46474, 1250, 4867, 5550, 592...
[ 0.0299072265625, 0.263671875, 0.05303955078125, 0.1898193359375, 0.205810546875, 0.2325439453125, 0.2142333984375, 0.0933837890625, 0.2484130859375, 0.06890869140625, 0.2374267578125, 0.2451171875, 0.1964111328125, 0.125732421875, 0.1898193359375, 0.05889892578125, 0.0643310546875, ...
embed
64364860_c0
64364860
prolog
0
Title: Prolog, how to collect all possible result in one list Problem title: Prolog, how to collect all possible result in one list Tags: recursion, prolog Problem: Prolog, how to collect all possible result in one list powerset([a,b,c ],X) X = [a, b, c] X = [a, c, b] X = [b, a, c] X = [b, c, a] X = [c, a, b] X = [c, b...
Prolog, how to collect all possible result in one list Prolog, how to collect all possible result in one list recursion prolog Prolog Prolog, how to collect all possible result in one list Those are all possible result . But now, I want to make those results into one list. How can I get it in prolog?
[ 0.0286865234375, 0.00421142578125, 0.0120849609375, 0.003204345703125, -0.0101318359375, 0.0026702880859375, -0.0174560546875, -0.0034942626953125, 0.01043701171875, -0.0294189453125, 0.00677490234375, -0.0033111572265625, -0.01324462890625, 0.01953125, -0.005706787109375, 0.015625, ...
[ 1250, 4867, 3642, 47, 43799, 756, 7722, 16750, 23, 1632, 5303, 195625, 502, 3444, 3249, 50339, 3934, 11249, 831, 2046, 442 ]
[ 0.1607666015625, 0.24365234375, 0.0633544921875, 0.03887939453125, 0.2037353515625, 0.12347412109375, 0.1854248046875, 0.2091064453125, 0.11444091796875, 0.119873046875, 0.2069091796875, 0.162353515625, 0.137939453125, 0.06610107421875, 0.05108642578125, 0.1929931640625, 0.1109619140...
embed
69274015_c0
69274015
prolog
0
Title: Why is the Prolog ',' operator right associative, while it is processed from left to right Problem title: Why is the Prolog ',' operator right associative, while it is processed from left to right Tags: prolog Problem: Why is the Prolog ',' operator right associative, while it is processed fr...
Why is the Prolog ',' operator right associative, while it is processed from left to right Why is the Prolog ',' operator right associative, while it is processed from left to right prolog left Why Prolog Why is the Prolog ',' operator right associative, while it is processed from left to right In p...
[ 0.05810546875, 0.0126953125, 0.02783203125, 0.022216796875, -0.004119873046875, 0.01068115234375, -0.002197265625, 0.0093994140625, 0.00299072265625, -0.019287109375, -0.006622314453125, -0.0255126953125, -0.000705718994140625, -0.015869140625, 0.000278472900390625, -0.00799560546875, ...
[ 44084, 83, 1250, 4867, 3768, 39933, 7108, 166027, 272, 12960, 9433, 1295, 25737, 47, 4, 502, 10644, 237, 1022, 18929, 69407, 84797, 375, 1510, 1221 ]
[ 0.1312255859375, 0.0303955078125, 0.1900634765625, 0.2587890625, 0.115234375, 0.2587890625, 0.2191162109375, 0.19287109375, 0.1431884765625, 0.08685302734375, 0.144775390625, 0.042938232421875, 0.1453857421875, 0.1168212890625, 0.12158203125, 0.1470947265625, 0.1690673828125, 0.036...
embed
26329744_c0
26329744
prolog
0
Title: Run Prolog code through Vim editor Problem title: Run Prolog code through Vim editor Tags: vim, prolog Problem: Run Prolog code through Vim editor I have installed SWI-Prolog and an editor. I am currently writing and running the code using them. Lately I started working using the Vim editor, so I would like to a...
Run Prolog code through Vim editor Run Prolog code through Vim editor vim prolog Run Prolog Vim Run Prolog code through Vim editor I have installed SWI-Prolog and an editor. I am currently writing and running the code using them. Lately I started working using the Vim editor, so I would like to ask, how can I run the P...
[ 0.032958984375, 0.0029449462890625, 0.0057373046875, 0.00421142578125, 0.004730224609375, 0.0269775390625, -0.026611328125, -0.00482177734375, -0.0284423828125, -0.0625, 0.01806640625, 0.0205078125, -0.0157470703125, 0.0027923583984375, -0.0087890625, -0.0238037109375, 0.014343261718...
[ 28398, 1250, 4867, 18151, 8305, 582, 39, 30391, 119916, 502, 20600, 159, 38969, 10752, 82424, 32562, 51042, 17368, 20697, 1884, 26458, 3642, 831, 11675, 70, 1295, 36497, 113292, 313, 145581 ]
[ 0.12255859375, 0.1990966796875, 0.2423095703125, 0.2119140625, 0.085693359375, 0.2197265625, 0.208251953125, 0.2108154296875, 0.248046875, 0.14501953125, 0.08056640625, 0.0147247314453125, 0.15576171875, 0.14453125, 0.036773681640625, 0.0677490234375, 0.088623046875, 0.023712158203...
embed
15725970_c0
15725970
prolog
0
Title: finding the element beside a specified element using prolog Problem title: finding the element beside a specified element using prolog Tags: prolog Problem: finding the element beside a specified element using prolog the query given is beside(Next,Beside,[a,b,c,d]). Next=a, Beside=b; Next=b, Beside=c; Next=c, Be...
finding the element beside a specified element using prolog finding the element beside a specified element using prolog prolog prolog Next Beside finding the element beside a specified element using prolog the query given is the rule should be true if the elements x,y is beside each other. Mine was only able to give th...
[ 0.01483154296875, 0.039306640625, -0.00885009765625, 0.015625, -0.010986328125, 0.0181884765625, -0.01251220703125, 0.007781982421875, 0.0142822265625, -0.03271484375, 0.00946044921875, -0.00738525390625, 0.0081787109375, -0.0185546875, -0.0032196044921875, -0.01519775390625, -0.0066...
[ 90791, 12830, 186, 8752, 58735, 502, 4867, 297, 17368, 4997, 41, 1294, 79986, 5608, 29568, 2174, 80854, 1022, 53, 83, 12638, 3789, 56713, 19048, 8337, 5117, 35166, 11, 873, 275, 10588, 2046, 22691, 756 ]
[ 0.1361083984375, 0.194091796875, 0.07635498046875, 0.2099609375, 0.155517578125, 0.1478271484375, 0.2298583984375, 0.00128173828125, 0.055084228515625, 0.165771484375, 0.07537841796875, 0.087890625, 0.1497802734375, 0.04443359375, 0.13916015625, 0.06982421875, 0.20556640625, 0.0393...
embed
53856614_c1
53856614
prolog
1
? creep Fail: (11) elem1(void, 1) ? creep Fail: (10) elem1(tree(1, void, void), 1) ? creep Fail: (9) elem1(tree(4, tree(1, void, void), tree(2, void, void)), 1) ? creep false. seems that call in right way the (10) and check correctly the predicate, but after try to expand more and give me a failure. I don't know why t...
? creep Fail: (11) elem1(void, 1) ? creep Fail: (10) elem1(tree(1, void, void), 1) ? creep Fail: (9) elem1(tree(4, tree(1, void, void), tree(2, void, void)), 1) ? creep false. seems that call in right way the (10) and check correctly the predicate, but after try to expand more and give me a failure. I don't know why t...
[ 0.0213623046875, 0.014404296875, -0.0021514892578125, 0.015869140625, 0.01300048828125, 0.028076171875, 0.0089111328125, -0.015625, -0.0059814453125, -0.033203125, 0.0113525390625, 0.0035247802734375, -0.01708984375, 0.008544921875, 0.01220703125, -0.01239013671875, 0.036376953125, ...
[ 705, 49512, 254, 190355, 21282, 88, 195, 418, 965, 532, 4879, 17857, 62600, 2292, 71, 11438, 105801, 53201, 54753, 98320, 37202, 11782, 23, 7108, 3917, 12765, 26785, 1653, 2063, 1284, 9790, 71062, 1286, 163, 137578, 3647, 7225, 20697, 5299,...
[ 0.055389404296875, 0.2205810546875, 0.1607666015625, 0.2066650390625, 0.1495361328125, 0.0625, 0.17724609375, 0.06689453125, 0.1109619140625, 0.05322265625, 0.0677490234375, 0.2071533203125, 0.1695556640625, 0.134033203125, 0.000335693359375, 0.13037109375, 0.09405517578125, 0.1579...
embed
20198856_c0
20198856
prolog
0
Title: Illegal start of terms Problem title: Illegal start of terms Tags: prolog Problem: Illegal start of terms I have written a function all_names in prolog that should seem to work fine: all_names([],[]):- !. all_names(node(A,_,_),A):- !. all_names(L,N):- maplist(all_names,L,N). but when running the code below, I re...
Illegal start of terms Illegal start of terms prolog Illegal all_names ERROR Syntax Illegal start of terms I have written a function all_names in prolog that should seem to work fine: but when running the code below, I receive and illegal start of terms error. Thanks The error:
[ 0.007080078125, 0.01177978515625, -0.0128173828125, 0.0203857421875, -0.01348876953125, 0.0244140625, -0.000400543212890625, 0.0035552978515625, -0.0169677734375, -0.0294189453125, 0.034423828125, -0.010009765625, -0.00421142578125, 0.0198974609375, 0.0224609375, -0.006927490234375, ...
[ 891, 86966, 4034, 111, 69407, 502, 4867, 756, 11627, 151206, 24638, 19010, 86531, 59121, 32354, 5608, 48903, 4488, 5885, 51042, 18151, 35064, 53299, 85325, 18499 ]
[ 0.0855712890625, 0.181884765625, 0.16455078125, 0.1593017578125, 0.2322998046875, 0.1248779296875, 0.22314453125, 0.150146484375, 0.21337890625, 0.13720703125, 0.05841064453125, 0.0482177734375, 0.09014892578125, 0.03875732421875, 0.146484375, 0.006610870361328125, 0.042388916015625,...
embed
58296847_c0
58296847
prolog
0
Title: Converting list to terms in Prolog Problem title: Converting list to terms in Prolog Tags: list, prolog, type-conversion Problem: Converting list to terms in Prolog I have to implement the predicate cons(List, Term) that will take a list [Head|Tail] and convert it to terms, represented as next(Head, Tail) . How ...
Converting list to terms in Prolog Converting list to terms in Prolog list prolog type-conversion Converting Prolog List Term Head Tail Converting list to terms in Prolog I have to implement the predicate cons(List, Term) that will take a list [Head|Tail] and convert it to terms, represented as next(Head, Tail) . How d...
[ 0.00921630859375, 0.0189208984375, -0.004150390625, 0.01806640625, -0.0072021484375, 0.025634765625, -0.00191497802734375, 0.00604248046875, -0.0032196044921875, -0.036376953125, 0.01043701171875, -0.002899169921875, -0.004852294921875, 0.01275634765625, -0.0031585693359375, 0.01574707...
[ 1657, 814, 1916, 5303, 47, 69407, 23, 1250, 4867, 502, 10644, 2271, 46354, 32036, 2994, 44816, 1218, 379, 29479, 1653, 2063, 67, 158, 7, 154663, 39, 5646, 13025, 712, 9874, 96760, 33636, 11737, 27781, 65771, 41 ]
[ 0.029327392578125, 0.1160888671875, 0.0062255859375, 0.235107421875, 0.098876953125, 0.2607421875, 0.005523681640625, 0.1556396484375, 0.2376708984375, 0.10675048828125, 0.114013671875, 0.031494140625, 0.11669921875, 0.1923828125, 0.160400390625, 0.17138671875, 0.1490478515625, 0.1...
embed
27479915_c0
27479915
prolog
0
Title: How to trim first N elements from in List in prolog Problem title: How to trim first N elements from in List in prolog Tags: list, concatenation, prolog, trim Problem: How to trim first N elements from in List in prolog How to write a prolog program to trim first N elements from a List in prolog using conc opera...
How to trim first N elements from in List in prolog How to trim first N elements from in List in prolog list concatenation prolog trim in How List How to trim first N elements from in List in prolog How to write a prolog program to trim first N elements from a List in prolog using conc operation. Can somebody please he...
[ 0.0137939453125, 0.018798828125, 0.015625, 0.0220947265625, -0.016845703125, -0.00811767578125, -0.00604248046875, 0.0341796875, 0.010986328125, -0.028076171875, 0.003173828125, -0.01348876953125, 0.00189208984375, 0.000690460205078125, 0.010986328125, 0.00193023681640625, 0.02087402...
[ 11249, 47, 85247, 5117, 541, 80854, 1295, 23, 32036, 502, 4867, 5303, 158, 4460, 33, 33022, 1528, 238, 41018, 176256, 22936, 4358, 35166, 26785 ]
[ 0.11688232421875, 0.044525146484375, 0.25341796875, 0.1722412109375, 0.232666015625, 0.2137451171875, 0.1258544921875, 0.053863525390625, 0.1859130859375, 0.16064453125, 0.220703125, 0.1446533203125, 0.141845703125, 0.094482421875, 0.038482666015625, 0.07177734375, 0.121337890625, ...
embed
16261744_c0
16261744
prolog
0
Title: SWI-Prolog goal fail variable binding result Problem title: SWI-Prolog goal fail variable binding result Tags: prolog Problem: SWI-Prolog goal fail variable binding result Is there any way that I can get a binding for a variable in Prolog even if the goal fails. I have a predicate where I am binding a variable w...
SWI-Prolog goal fail variable binding result SWI-Prolog goal fail variable binding result prolog SWI-Prolog SWI-Prolog goal fail variable binding result Is there any way that I can get a binding for a variable in Prolog even if the goal fails. I have a predicate where I am binding a variable with some value and after t...
[ 0.0181884765625, 0.0419921875, -0.003021240234375, -0.0079345703125, -0.00384521484375, 0.00689697265625, 0.01287841796875, -0.003387451171875, -0.01287841796875, 0.0108642578125, -0.003570556640625, -0.00531005859375, -0.0130615234375, 0.005584716796875, 0.01177978515625, 0.0060424804...
[ 159, 38969, 10752, 4867, 69236, 35782, 77336, 128239, 16750, 502, 3917, 831, 2046, 10, 100, 23, 1250, 3853, 2174, 7, 1653, 2063, 34292, 214, 143726, 11675, 41, 1294, 50339, 101904, 333, 6238 ]
[ 0.018798828125, 0.1810302734375, 0.10076904296875, 0.2222900390625, 0.20263671875, 0.2098388671875, 0.24365234375, 0.2344970703125, 0.1484375, 0.076904296875, 0.049560546875, 0.046783447265625, 0.0880126953125, 0.053436279296875, 0.03387451171875, 0.013031005859375, 0.13720703125, ...
embed
20830959_c0
20830959
prolog
0
Title: Count number of check to build the list Problem title: Count number of check to build the list Tags: prolog Problem: Count number of check to build the list I have an error when i count number of check in order to build the list. Here is my code: find(_R1, _R2, [], [],0). find(R1, R2, [[Mark, CName] | T], L,N) :...
Count number of check to build the list Count number of check to build the list prolog Count _R1 _R2 Mark CName ERROR Arguments Count number of check to build the list I have an error when i count number of check in order to build the list. Here is my code: I get the following error:
[ 0.00653076171875, 0.000911712646484375, -0.00072479248046875, 0.0135498046875, -0.0052490234375, 0.0162353515625, -0.0284423828125, 0.01348876953125, 0.026611328125, -0.005615234375, 0.01025390625, -0.022705078125, 0.0257568359375, 0.004852294921875, 0.0146484375, -0.00909423828125, ...
[ 108210, 14012, 111, 12765, 47, 45367, 5303, 502, 4867, 1052, 418, 304, 7880, 313, 163612, 151206, 24638, 112140, 18499, 54529, 12989, 18151, 70, 25632 ]
[ 0.2041015625, 0.158203125, 0.108154296875, 0.279541015625, 0.06695556640625, 0.1805419921875, 0.208984375, 0.1287841796875, 0.1666259765625, 0.0628662109375, 0.03790283203125, 0.05670166015625, 0.10931396484375, 0.0014505386352539062, 0.166748046875, 0.1163330078125, 0.100830078125, ...
embed
28266177_c0
28266177
prolog
0
Title: Binary Tree counting nodes in prolog Problem title: Binary Tree counting nodes in prolog Tags: prolog Problem: Binary Tree counting nodes in prolog I built the binary tree that has the stucture bt(Data,LeftTree,RightTree). btree(nil). btree(bt(_,L,R)) :- btree(L), btree(R). then I want to define predicate count1...
Binary Tree counting nodes in prolog Binary Tree counting nodes in prolog prolog Binary Tree Binary Tree counting nodes in prolog I built the binary tree that has the stucture bt(Data,LeftTree,RightTree). then I want to define predicate count1Child(Tree, Count) that assert that Count is the number of nodes in the tree ...
[ 0.038330078125, 0.0045166015625, -0.004058837890625, -0.0272216796875, 0.015625, 0.0064697265625, -0.021484375, -0.0047607421875, 0.018798828125, -0.049560546875, -0.0272216796875, -0.0308837890625, -0.006195068359375, 0.01312255859375, 0.01507568359375, -0.0010528564453125, 0.010803...
[ 54092, 1294, 101344, 54529, 214, 110, 988, 502, 4867, 23, 88303, 2394, 6635, 53201, 18784, 137989, 62731, 22553, 61924, 1653, 2063, 67, 418, 441, 102656, 108210, 83, 14012, 765, 1632, 29041, 3622, 112, 678, 4734 ]
[ 0.1812744140625, 0.0731201171875, 0.2308349609375, 0.1549072265625, 0.015380859375, 0.16650390625, 0.1627197265625, 0.1448974609375, 0.19482421875, 0.0106201171875, 0.043365478515625, 0.1358642578125, 0.058319091796875, 0.179931640625, 0.022735595703125, 0.0673828125, 0.1749267578125...
embed
55208821_c0
55208821
prolog
0
Title: Write a predicate to divide a list of numbers into multiple lists Problem title: Write a predicate to divide a list of numbers into multiple lists Tags: prolog Problem: Write a predicate to divide a list of numbers into multiple lists Divide a list of numbers into multiple lists, each of which is the longest seq...
Write a predicate to divide a list of numbers into multiple lists Write a predicate to divide a list of numbers into multiple lists prolog Write plus_or_minus RunList Write a predicate to divide a list of numbers into multiple lists Divide a list of numbers into multiple lists, each of which is the longest sequence of ...
[ -0.00007677078247070312, 0.020751953125, -0.004547119140625, 0.01953125, -0.028564453125, 0.01019287109375, 0.00762939453125, 0.004913330078125, 0.012939453125, 0.0052490234375, -0.00013446807861328125, 0.0279541015625, 0.00090789794921875, 0.026123046875, -0.0037384033203125, 0.003112...
[ 601, 18781, 1653, 2063, 67, 47, 101637, 5303, 101935, 3934, 48716, 7, 502, 4867, 1001, 748, 34731, 28398, 154663, 10, 76278, 112, 12638, 4989, 525, 40, 944, 40907, 707, 351, 3331, 7311, 27781 ]
[ 0.0897216796875, 0.1312255859375, 0.183837890625, 0.2340087890625, 0.1859130859375, 0.07696533203125, 0.2354736328125, 0.256103515625, 0.2025146484375, 0.1817626953125, 0.2200927734375, 0.025482177734375, 0.139892578125, 0.18603515625, 0.1837158203125, 0.09228515625, 0.189208984375, ...
embed
5920450_c0
5920450
prolog
0
Title: Learning prolog Problem title: Learning prolog Tags: prolog Problem: Learning prolog I am trying to learn Prolog and i have a really big problem to convert my programming knowledge to this language. I cant solve really newbie problems. For example i have this a(b(1)). a(b(2)). a(b(3)). a(b(4)). a(b(6)). The exer...
Learning prolog Learning prolog prolog Learning Learning prolog I am trying to learn Prolog and i have a really big problem to convert my programming knowledge to this language. I cant solve really newbie problems. For example i have this The exercise wants to print (using writeln(X)) all b(Y) if Y is an even number. I...
[ 0.002716064453125, -0.00131988525390625, 0.01123046875, -0.0021209716796875, -0.01397705078125, 0.042236328125, -0.009033203125, -0.01373291015625, 0.01519775390625, -0.0286865234375, 0.004913330078125, -0.018310546875, -0.01190185546875, -0.005096435546875, 0.0064697265625, -0.0067138...
[ 114344, 502, 4867, 87, 31577, 30698, 1250, 17, 765, 6183, 6957, 2967, 96760, 56037, 449, 51359, 47, 903, 46876, 45767, 86869, 3525, 9014, 44402, 1326, 81979, 86171, 28412, 223, 33022, 141, 19, 132, 1542, 756, 876, 1723, 2174, 990, 83, 3...
[ 0.1588134765625, 0.169921875, 0.277099609375, 0.0169219970703125, 0.07879638671875, 0.1009521484375, 0.1640625, 0.005035400390625, 0.069091796875, 0.0751953125, 0.037109375, 0.1309814453125, 0.1351318359375, 0.0989990234375, 0.0089111328125, 0.09820556640625, 0.0654296875, 0.078918...
embed
66627455_c0
66627455
prolog
0
Title: Prolog flatten/2 implementation Problem title: Prolog flatten/2 implementation Tags: prolog, infinite-recursion, recursion Problem: Prolog flatten/2 implementation Here is my implementation of flatten/2 : flt([], []). flt([H|L], [H|X]):- not(is_list(H)), flt(L, X). flt([H|L], X):- append(R, F, X), flt(H, R), flt...
Prolog flatten/2 implementation Prolog flatten/2 implementation prolog infinite-recursion recursion Prolog is_list Prolog flatten/2 implementation Here is my implementation of flatten/2 : The expected result is given: However, when I hit ; the stack limit is exceeded. Why does this happen? Where is the infinite recursi...
[ 0.01361083984375, 0.016357421875, 0.028076171875, -0.005645751953125, -0.00138092041015625, 0.00946044921875, 0.002410888671875, -0.0029754638671875, 0.0291748046875, -0.0147705078125, 0.0079345703125, -0.01202392578125, -0.01348876953125, 0.0037841796875, 0.0257568359375, -0.008850097...
[ 1250, 4867, 49878, 510, 12477, 208124, 502, 54241, 13, 107, 48650, 1830, 195625, 83, 6562, 84751, 16750, 33306, 3229, 5962, 177261, 17475, 204839, 44084, 53383, 78662 ]
[ 0.1331787109375, 0.220947265625, 0.2235107421875, 0.18994140625, 0.2110595703125, 0.153564453125, 0.09857177734375, 0.1514892578125, 0.07879638671875, 0.0631103515625, 0.181884765625, 0.10882568359375, 0.2093505859375, 0.09393310546875, 0.2113037109375, 0.1514892578125, 0.08374023437...
embed
5761747_c0
5761747
prolog
0
Title: prolog - need to explain union and intersection Problem title: prolog - need to explain union and intersection Tags: prolog Problem: prolog - need to explain union and intersection /* e */ union([A|B], C, D) :- member(A,C), !, union(B,C,D). union([A|B], C, [A|D]) :- union(B,C,D). union([],Z,Z). /* f */ intersect...
prolog - need to explain union and intersection prolog - need to explain union and intersection prolog prolog - need to explain union and intersection Can you guys explain clearly how these expression, maybe in a tree, thanks much. I'm very new to prolog :)
[ 0.0133056640625, 0.01556396484375, 0.0142822265625, -0.006195068359375, -0.01397705078125, 0.0157470703125, -0.01287841796875, 0.01104736328125, 0.0001678466796875, -0.01611328125, 0.012939453125, 0.00872802734375, 0.00604248046875, 0.003662109375, 0.0283203125, -0.0001373291015625, ...
[ 502, 4867, 3871, 47, 73342, 69941, 136, 1940, 7, 58994, 4171, 51484, 123019, 3642, 6097, 125195, 23, 53201, 4552, 3525 ]
[ 0.13720703125, 0.2139892578125, 0.131591796875, 0.05517578125, 0.2000732421875, 0.2484130859375, 0.158447265625, 0.1705322265625, 0.1717529296875, 0.1510009765625, 0.01258087158203125, 0.0204620361328125, 0.095947265625, 0.10723876953125, 0.125244140625, 0.251220703125, 0.02383422851...
embed
73808674_c0
73808674
prolog
0
Title: Search exhaustively through a knowledge base in Prolog through a query Problem title: Search exhaustively through a knowledge base in Prolog through a query Tags: prolog Problem: Search exhaustively through a knowledge base in Prolog through a query If I have a knowledge base of people and their birthdays like: ...
Search exhaustively through a knowledge base in Prolog through a query Search exhaustively through a knowledge base in Prolog through a query prolog Search Prolog Search exhaustively through a knowledge base in Prolog through a query If I have a knowledge base of people and their birthdays like: How would I create a qu...
[ 0.032470703125, 0.012451171875, 0.00970458984375, 0.0174560546875, -0.023193359375, 0.02978515625, -0.01007080078125, -0.007232666015625, 0.00616455078125, -0.041015625, 0.00897216796875, -0.0047607421875, -0.0068359375, -0.002044677734375, -0.00028228759765625, -0.00052642822265625, ...
[ 33086, 146353, 5844, 538, 8305, 51359, 3647, 23, 1250, 4867, 41, 1294, 502, 4263, 765, 111, 3395, 136, 2363, 101207, 1884, 11249, 2806, 28282, 47, 33938, 70, 7413, 27150, 525, 3445, 15490, 2811, 151138 ]
[ 0.201416015625, 0.1749267578125, 0.1024169921875, 0.027679443359375, 0.138671875, 0.1622314453125, 0.203857421875, 0.03936767578125, 0.150390625, 0.251220703125, 0.1485595703125, 0.1622314453125, 0.1163330078125, 0.001220703125, 0.0150604248046875, 0.032318115234375, 0.0987548828125,...
embed
8016325_c0
8016325
prolog
0
Title: Prolog-based interpreter Problem title: Prolog-based interpreter Tags: compiler-construction, dcg, interpreter, prolog Problem: Prolog-based interpreter I've already gotten my feet wet with functional programming; I am familiar (though not proficient) in Haskell and PLT Scheme. I've used PLT Scheme to build litt...
Prolog-based interpreter Prolog-based interpreter compiler-construction dcg interpreter prolog Prolog-based Prolog-based interpreter I've already gotten my feet wet with functional programming; I am familiar (though not proficient) in Haskell and PLT Scheme. I've used PLT Scheme to build little interpreters for toy lan...
[ 0.026123046875, -0.01202392578125, 0.00970458984375, 0.0107421875, -0.01287841796875, 0.0166015625, 0.007659912109375, -0.003875732421875, -0.004180908203125, -0.0556640625, -0.0157470703125, 0.0101318359375, -0.0220947265625, 0.0002574920654296875, 0.007537841796875, 0.003860473632812...
[ 1250, 4867, 77007, 29481, 56, 9969, 34759, 238478, 104, 238, 177, 502, 21771, 17763, 74261, 36311, 678, 123309, 56037, 16031, 959, 46902, 45964, 20625, 142508, 436, 27026, 34702, 282, 11814, 45367, 10176, 1314, 72713, 46876, 69988, 102568, 11...
[ 0.1573486328125, 0.23681640625, 0.10540771484375, 0.2255859375, 0.12646484375, 0.0838623046875, 0.10186767578125, 0.08868408203125, 0.00714111328125, 0.0145416259765625, 0.0928955078125, 0.111572265625, 0.07257080078125, 0.008880615234375, 0.009429931640625, 0.050628662109375, 0.0196...
embed
70021980_c0
70021980
prolog
0
Title: SWI Prolog syntax need to write more than one word in term Problem title: SWI Prolog syntax need to write more than one word in term Tags: prolog Problem: SWI Prolog syntax need to write more than one word in term How can I write more than one word in hypothesize term and other side? For example I want to write ...
SWI Prolog syntax need to write more than one word in term SWI Prolog syntax need to write more than one word in term prolog SWI Prolog SWI Prolog syntax need to write more than one word in term How can I write more than one word in hypothesize term and other side? For example I want to write small cat I tried to write...
[ 0.0079345703125, 0.00970458984375, -0.0074462890625, 0.021484375, -0.0233154296875, -0.00118255615234375, 0.003570556640625, 0.006744384765625, -0.00921630859375, -0.0203857421875, 0.0157470703125, -0.0004177093505859375, -0.00811767578125, -0.0021514892578125, 0.00897216796875, 0.0057...
[ 159, 38969, 1250, 4867, 6002, 86531, 3871, 33022, 1286, 3501, 1632, 2565, 23, 13579, 502, 831, 170933, 62539, 136, 3789, 5609, 3444, 19336, 7515, 678, 1379, 30854, 108975, 18151, 6366, 84433, 3454, 77275 ]
[ 0.0606689453125, 0.2347412109375, 0.171630859375, 0.230224609375, 0.12451171875, 0.15576171875, 0.113525390625, 0.1922607421875, 0.1795654296875, 0.1619873046875, 0.1387939453125, 0.2005615234375, 0.06292724609375, 0.242919921875, 0.1658935546875, 0.045562744140625, 0.217529296875, ...
embed
4102535_c0
4102535
prolog
0
Title: What do results like Z = [_G305] mean in prolog? Problem title: What do results like Z = [_G305] mean in prolog? Tags: prolog Problem: What do results like Z = [_G305] mean in prolog? I've got these definitions: memberx(X, [X|_]). memberx(X, [_|T]) :- memberx(X, T). intersectionx([], _, []). intersectionx([H|T],...
What do results like Z = [_G305] mean in prolog? What do results like Z = [_G305] mean in prolog? prolog What _G305 What do results like Z = [_G305] mean in prolog? I've got these definitions: I get the following result: Why doesn't it result in Z = [1]??
[ 0.01190185546875, -0.002166748046875, 0.005157470703125, -0.0047607421875, -0.01708984375, 0.0179443359375, 0.01470947265625, 0.00469970703125, 0.013427734375, 0.0230712890625, 0.0142822265625, 0.0047607421875, -0.008544921875, -0.004241943359375, 0.007049560546875, 0.0206298828125, ...
[ 4865, 50339, 1884, 567, 2203, 724, 169920, 29459, 23, 502, 4867, 54, 80934, 25632, 16750, 44084, 22027, 18, 17550 ]
[ 0.02783203125, 0.1654052734375, 0.07525634765625, 0.172607421875, 0.1634521484375, 0.08575439453125, 0.29443359375, 0.12286376953125, 0.03826904296875, 0.1343994140625, 0.1884765625, 0.0017824172973632812, 0.11328125, 0.003223419189453125, 0.13671875, 0.0421142578125, 0.0033531188964...
embed
22577296_c1
22577296
prolog
1
> 0, s([A-X,Y],[A1-X1,Y1],Action), Max1 is Maxdepth - 1, depthfirst([A1-X1,Y1],Sol,Max1). EDIT : Ok, now I know it is related to the "Depth" being specified. I removed the constraint MaxDepth from depthfirst , and it is working now. However the original depthfirst was finding a solution in the given Depth, then how co...
> 0, s([A-X,Y],[A1-X1,Y1],Action), Max1 is Maxdepth - 1, depthfirst([A1-X1,Y1],Sol,Max1). EDIT : Ok, now I know it is related to the "Depth" being specified. I removed the constraint MaxDepth from depthfirst , and it is working now. However the original depthfirst was finding a solution in the given Depth, then how co...
[ 0.0084228515625, 0.001312255859375, 0.0244140625, 0.016845703125, -0.01025390625, 0.004547119140625, 0.005340576171875, -0.000637054443359375, 0.0233154296875, -0.0247802734375, 0.01068115234375, -0.00445556640625, 0.00138092041015625, -0.0042724609375, 0.0194091796875, -0.002197265625...
[ 977, 757, 91, 284, 9, 1542, 1723, 20268, 418, 76172, 10763, 9920, 83, 168867, 106, 13448, 271, 102588, 71346, 17727, 62548, 4657, 254, 927, 58735, 297, 184750, 158, 2816, 4288, 20697, 70, 7311, 90791, 29806, 34475, 262, 1380, 959, 19048, ...
[ 0.0447998046875, 0.1097412109375, 0.07281494140625, 0.07843017578125, 0.0274658203125, 0.0736083984375, 0.07080078125, 0.05194091796875, 0.1236572265625, 0.04132080078125, 0.103271484375, 0.2037353515625, 0.05572509765625, 0.295654296875, 0.0789794921875, 0.1728515625, 0.168212890625...
embed
4578755_c0
4578755
prolog
0
Title: Permuted combinations of the elements of a list - Prolog Problem title: Permuted combinations of the elements of a list - Prolog Tags: prolog Problem: Permuted combinations of the elements of a list - Prolog How can I generate all the possible combinations of the elements of a list? For example, given the list [...
Permuted combinations of the elements of a list - Prolog Permuted combinations of the elements of a list - Prolog prolog Permuted Prolog Permuted combinations of the elements of a list - Prolog How can I generate all the possible combinations of the elements of a list? For example, given the list [1,2,3] , I want to de...
[ -0.01708984375, 0.0322265625, 0.01519775390625, 0.01153564453125, -0.00083160400390625, 0.020263671875, -0.028564453125, -0.0018463134765625, 0.006378173828125, -0.024169921875, -0.00738525390625, 0.00616455078125, 0.0281982421875, 0.020751953125, -0.01611328125, 0.0224609375, -0.001...
[ 908, 561, 3674, 162515, 7, 80854, 5303, 1250, 4867, 502, 11249, 831, 87, 139392, 756, 70, 7722, 111, 10, 27781, 34475, 155761, 3444, 4331, 1653, 2063, 67, 3173, 375, 275, 133063, 96386, 339, 30646, 25632, 35166 ]
[ 0.0975341796875, 0.2113037109375, 0.07513427734375, 0.270263671875, 0.036346435546875, 0.205810546875, 0.2147216796875, 0.1019287109375, 0.172119140625, 0.038604736328125, 0.037750244140625, 0.05792236328125, 0.032928466796875, 0.2034912109375, 0.13427734375, 0.0902099609375, 0.20703...
embed
58697088_c0
58697088
prolog
0
Title: SWI-prolog Semantic reasoning Problem title: SWI-prolog Semantic reasoning Tags: owl, prolog, swi-prolog Problem: SWI-prolog Semantic reasoning I want to convert an owl file to prolog .owl -> .pl the documentation that found within rdfs2pl package was not helpfull any hints on how can I proceed? gen :- rdf_load(...
SWI-prolog Semantic reasoning SWI-prolog Semantic reasoning owl prolog swi-prolog SWI-prolog Semantic SWI-prolog Semantic reasoning I want to convert an owl file to prolog .owl -> .pl the documentation that found within rdfs2pl package was not helpfull any hints on how can I proceed? gen :- rdf_load('C:/test/pizza.owl'...
[ 0.004730224609375, 0.01043701171875, -0.0111083984375, 0.01116943359375, -0.006866455078125, -0.00653076171875, 0.0014801025390625, 0.0028228759765625, 0.00194549560546875, -0.04833984375, 0.01904296875, 0.009521484375, -0.01953125, -0.0140380859375, 0.0213623046875, -0.0035400390625, ...
[ 159, 38969, 3454, 4867, 10232, 109109, 31635, 36, 27751, 502, 2452, 214, 3444, 96760, 11435, 47, 5, 31, 33079, 2424, 209806, 4216, 17447, 304, 98169, 98893, 5122, 172337, 9226, 420, 63033, 6954, 1434, 7070, 14192, 33022, 7560, 104588, 434, ...
[ 0.040802001953125, 0.2139892578125, 0.138916015625, 0.241455078125, 0.1385498046875, 0.08984375, 0.176025390625, 0.0916748046875, 0.2313232421875, 0.166259765625, 0.18701171875, 0.009979248046875, 0.052520751953125, 0.173828125, 0.1795654296875, 0.08160400390625, 0.0367431640625, 0...
embed
23392395_c0
23392395
prolog
0
Title: Prolog - compare two numbers Problem title: Prolog - compare two numbers Tags: prolog Problem: Prolog - compare two numbers I have some atoms that stand for the numbers 1 to 4 for example. Like number(one). number(two). number(three). number(four). Now I have to write a predicate that checks if the first number ...
Prolog - compare two numbers Prolog - compare two numbers prolog Prolog Prolog - compare two numbers I have some atoms that stand for the numbers 1 to 4 for example. Like Now I have to write a predicate that checks if the first number is bigger then the second one. But now I can only ask sth like But I want to How can ...
[ 0.00994873046875, 0.0023193359375, 0.006011962890625, 0.007598876953125, -0.005279541015625, 0.0225830078125, -0.0029144287109375, 0.00848388671875, 0.007476806640625, -0.0002593994140625, 0.00567626953125, 0.016845703125, -0.01611328125, -0.0234375, 0.02294921875, 0.00811767578125, ...
[ 1250, 4867, 69101, 6626, 101935, 502, 20, 87, 765, 34627, 7, 9157, 100, 106, 47, 201, 27781, 18852, 14240, 33022, 10, 1653, 2063, 67, 12765, 2174, 5117, 14012, 83, 167785, 7068, 17932, 1632, 5036, 831, 4734, 26458, 927, 1884, 4966, 3444...
[ 0.1700439453125, 0.244873046875, 0.2255859375, 0.127197265625, 0.182373046875, 0.1368408203125, 0.007843017578125, 0.0623779296875, 0.029571533203125, 0.2138671875, 0.050811767578125, 0.1170654296875, 0.061248779296875, 0.0765380859375, 0.11474609375, 0.1761474609375, 0.0287475585937...
embed
15254307_c0
15254307
prolog
0
Title: Unifying a term with the Nth value of a list Problem title: Unifying a term with the Nth value of a list Tags: prolog Problem: Unifying a term with the Nth value of a list I'm having trouble implementing a Prolog predicate, vector_reference(L,N,V) , so that when given a list "L" and an index "N" it will unify V ...
Unifying a term with the Nth value of a list Unifying a term with the Nth value of a list prolog Unifying Nth vector_reference Unifying a term with the Nth value of a list I'm having trouble implementing a Prolog predicate, vector_reference(L,N,V) , so that when given a list "L" and an index "N" it will unify V with th...
[ -0.00634765625, 0.028564453125, -0.00152587890625, -0.0015869140625, 0.00469970703125, 0.003997802734375, -0.010498046875, -0.0010528564453125, -0.005523681640625, -0.03759765625, 0.0014495849609375, 0.00537109375, -0.006927490234375, 0.007537841796875, -0.01953125, 0.0036468505859375,...
[ 992, 151138, 13579, 678, 541, 927, 34292, 5303, 502, 4867, 173, 18770, 239879, 63134, 29479, 1250, 1653, 2063, 67, 866, 839, 856, 6, 34475, 136, 63262, 51, 40383, 310, 70, 27781, 28412, 1810, 35064, 4358, 77947, 5 ]
[ 0.19140625, 0.1187744140625, 0.2142333984375, 0.12646484375, 0.1966552734375, 0.245849609375, 0.1837158203125, 0.1800537109375, 0.1361083984375, 0.205078125, 0.1812744140625, 0.196533203125, 0.2415771484375, 0.0821533203125, 0.145263671875, 0.1492919921875, 0.124755859375, 0.135375...
embed
16047339_c0
16047339
prolog
0
Title: Prolog converting integer to a list of digit Problem title: Prolog converting integer to a list of digit Tags: prolog, list, digit, clpfd Problem: Prolog converting integer to a list of digit I want to write a predicate that an integer and a list of digits, and succeed if Digits contain the digits of the integer...
Prolog converting integer to a list of digit Prolog converting integer to a list of digit prolog list digit clpfd Prolog digit_lists Num my_digits Prolog converting integer to a list of digit I want to write a predicate that an integer and a list of digits, and succeed if Digits contain the digits of the integer in the...
[ -0.0050048828125, -0.01123046875, 0.005035400390625, -0.0021514892578125, -0.0186767578125, 0.036376953125, 0.00396728515625, 0.0012054443359375, 0.011474609375, -0.039794921875, -0.01092529296875, -0.012939453125, -0.017578125, 0.022216796875, 0.01129150390625, -0.00958251953125, 0....
[ 1250, 4867, 96760, 892, 1505, 47, 5303, 111, 153939, 214, 502, 39557, 71, 6562, 52782, 759, 4803, 14481, 3444, 33022, 1653, 2063, 67, 136, 214493, 2174, 51174, 933, 70541, 27798, 12989, 765, 2060 ]
[ 0.165771484375, 0.2427978515625, 0.1400146484375, 0.1513671875, 0.1533203125, 0.06591796875, 0.1588134765625, 0.060089111328125, 0.1983642578125, 0.0155029296875, 0.121337890625, 0.0308380126953125, 0.03662109375, 0.1636962890625, 0.1383056640625, 0.119140625, 0.1265869140625, 0.04...
embed
72390870_c1
72390870
prolog
1
e ? ; no Another expected test | ?- functorOfCompoundSubterm(a(b(G,1,c(2)),3,d(e(4,g),5)),FN). FN = a/3 ? ; FN = b/3 ? ; FN = c/1 ? ; FN = d/2 ? ; FN = e/2 ? ; no and it shows this error when trying to execute the goal | ?- | ?- functorOfCompoundSubterm(a(b(G,1,c(2)),3,d(e(4,g),5)),FN). ! Syntax error ! | cannot start...
e ? ; no Another expected test | ?- functorOfCompoundSubterm(a(b(G,1,c(2)),3,d(e(4,g),5)),FN). FN = a/3 ? ; FN = b/3 ? ; FN = c/1 ? ; FN = d/2 ? ; FN = e/2 ? ; no and it shows this error when trying to execute the goal | ?- | ?- functorOfCompoundSubterm(a(b(G,1,c(2)),3,d(e(4,g),5)),FN). ! Syntax error ! | cannot start...
[ 0.0034942626953125, 0.01177978515625, 0.0086669921875, 0.0120849609375, -0.0152587890625, -0.000972747802734375, -0.006103515625, -0.0040283203125, 0.005706787109375, 0.0028839111328125, 0.0038299560546875, -0.0032806396484375, -0.0185546875, 0.01361083984375, 0.013916015625, -0.018798...
[ 28, 705, 2819, 110, 116267, 84751, 3034, 7477, 18770, 132887, 108161, 31, 7030, 96472, 32166, 275, 724, 40970, 363, 71, 13, 105801, 177, 43317, 919, 839, 73213, 2203, 18113, 876, 11583, 104, 12477, 45831, 18499, 3229, 31577, 71924, 69236, ...
[ 0.16650390625, 0.076904296875, 0.0259552001953125, 0.160400390625, 0.0777587890625, 0.2237548828125, 0.260009765625, 0.1455078125, 0.1973876953125, 0.1427001953125, 0.102294921875, 0.1455078125, 0.079833984375, 0.166748046875, 0.20654296875, 0.0372314453125, 0.08197021484375, 0.024...
embed
16829206_c0
16829206
prolog
0
Title: checking if sum of list is value in prolog Problem title: checking if sum of list is value in prolog Tags: prolog Problem: checking if sum of list is value in prolog I'm trying to write a simple predicate that will determine if all the elements of a list add up to a sum, but I don't understand why mine isn't wor...
checking if sum of list is value in prolog checking if sum of list is value in prolog prolog list_sum V-F checking if sum of list is value in prolog I'm trying to write a simple predicate that will determine if all the elements of a list add up to a sum, but I don't understand why mine isn't working. It seems like it s...
[ -0.00885009765625, -0.0007781982421875, 0.007476806640625, 0.01165771484375, -0.0283203125, 0.0031280517578125, -0.013427734375, 0.0145263671875, 0.0142822265625, -0.00174713134765625, 0.0291748046875, 0.0029754638671875, 0.00958251953125, 0.007598876953125, -0.002197265625, -0.0015792...
[ 175199, 2174, 10554, 111, 5303, 83, 34292, 23, 502, 4867, 11832, 310, 9, 919, 31577, 33022, 8781, 1653, 2063, 67, 83324, 756, 80854, 15190, 1257, 47, 28219, 5665, 18, 20697, 37202, 4488, 132, 133063, 96386, 1542, 30646, 110, 59690, 56574 ...
[ 0.1658935546875, 0.0731201171875, 0.221923828125, 0.121337890625, 0.19921875, 0.0955810546875, 0.2060546875, 0.0271453857421875, 0.1295166015625, 0.20361328125, 0.2027587890625, 0.10546875, 0.015289306640625, 0.091552734375, 0.00518798828125, 0.008453369140625, 0.03118896484375, 0....
embed
60203409_c0
60203409
prolog
0
Title: Avoid double recursive call in Prolog Problem title: Avoid double recursive call in Prolog Tags: prolog, program-transformation, recursion Problem: Avoid double recursive call in Prolog I have this Prolog code: f([ ],-1). f([H|T],S):- f(T,S1), S1>0, !, S is S1+H. f([_|T],S):- f(T,S1), S is S1. How can I avoid th...
Avoid double recursive call in Prolog Avoid double recursive call in Prolog prolog program-transformation recursion Avoid Prolog Avoid double recursive call in Prolog I have this Prolog code: How can I avoid the second (redundant) recursive call f(T,S1) , in the third clause, the overall effect of predicate remaining t...
[ -0.006500244140625, 0.01348876953125, 0.0157470703125, 0.007293701171875, -0.006439208984375, -0.01251220703125, -0.014404296875, 0.013916015625, 0.000949859619140625, -0.03076171875, 0.0260009765625, 0.01287841796875, -0.031005859375, 0.002227783203125, 0.02734375, 0.01434326171875, ...
[ 84361, 532, 41929, 195625, 5844, 11782, 1250, 4867, 502, 1528, 215175, 18151, 11249, 831, 71864, 17932, 2822, 35405, 1238, 618, 17727, 50960, 70731, 128512, 21543, 1653, 2063, 67, 47143, 5701, 13204, 78301, 61924 ]
[ 0.1502685546875, 0.05804443359375, 0.194580078125, 0.1934814453125, 0.098388671875, 0.196533203125, 0.1553955078125, 0.2220458984375, 0.1124267578125, 0.0916748046875, 0.1546630859375, 0.08917236328125, 0.008087158203125, 0.0164794921875, 0.217041015625, 0.13134765625, 0.005889892578...
embed
59242527_c0
59242527
prolog
0
Title: Making a sublist out of a list of lists Problem title: Making a sublist out of a list of lists Tags: list, prolog Problem: Making a sublist out of a list of lists I'm trying to make a sublist out of a list of lists in gprolog. Say I have a list like this: List = [[q,1,3], [q,2,7], [r,3,2], [r,8,7]] I want to mak...
Making a sublist out of a list of lists Making a sublist out of a list of lists list prolog Making List NewList Making a sublist out of a list of lists I'm trying to make a sublist out of a list of lists in gprolog. Say I have a list like this: I want to make a sublist of just the elements that start with 'q'. I tried ...
[ -0.00102996826171875, -0.00004029273986816406, 0.01263427734375, 0.00927734375, -0.0228271484375, 0.0172119140625, -0.0032196044921875, 0.0169677734375, 0.02587890625, -0.0026702880859375, 0.0120849609375, -0.003753662109375, -0.0000782012939453125, 0.015380859375, -0.0169677734375, 0....
[ 13676, 1614, 6562, 1810, 111, 5303, 214, 502, 4867, 32036, 2356, 154663, 7, 31577, 3249, 706, 3454, 3444, 10, 1660, 80854, 4034, 678, 864, 154109, 42, 4488, 132283, 8781, 16031 ]
[ 0.075927734375, 0.209716796875, 0.255859375, 0.09051513671875, 0.0738525390625, 0.2066650390625, 0.001220703125, 0.0892333984375, 0.1741943359375, 0.1590576171875, 0.076416015625, 0.1973876953125, 0.026611328125, 0.0267181396484375, 0.078857421875, 0.045806884765625, 0.1248779296875,...
embed
59557223_c0
59557223
prolog
0
Title: SMT solver versus Prolog Problem title: SMT solver versus Prolog Tags: smt, prolog Problem: SMT solver versus Prolog What are the main differences between an SMT solver, like CVC4, and Prolog? Can one do something the other cannot? My plan is to produce queries using R, send them to an SMT solver, and to modify ...
SMT solver versus Prolog SMT solver versus Prolog smt prolog SMT Prolog SMT solver versus Prolog What are the main differences between an SMT solver, like CVC4, and Prolog? Can one do something the other cannot? My plan is to produce queries using R, send them to an SMT solver, and to modify queries based on the SMT ou...
[ 0.025390625, 0.0152587890625, 0.01019287109375, 0.0181884765625, -0.016357421875, -0.002960205078125, -0.01019287109375, -0.01531982421875, -0.006622314453125, -0.04248046875, -0.00015544891357421875, 0.017578125, -0.030517578125, 0.00665283203125, 0.0015106201171875, 0.012939453125, ...
[ 159, 37290, 3115, 814, 119475, 1250, 4867, 14050, 18, 502, 5201, 60212, 7, 17721, 27479, 441, 617, 136, 4171, 54, 9844, 3789, 53418, 1774, 27489, 41, 10484, 17368, 627, 25379, 2811, 35509, 140992, 157318, 100, 142105, 24087, 60875, 55738, ...
[ 0.123291015625, 0.263671875, 0.1834716796875, 0.18212890625, 0.153564453125, 0.18017578125, 0.24072265625, 0.1409912109375, 0.1097412109375, 0.1240234375, 0.06158447265625, 0.2119140625, 0.095703125, 0.11962890625, 0.167724609375, 0.09716796875, 0.216796875, 0.041839599609375, 0....
embed
22591030_c2
22591030
prolog
2
well as: :- dynamic samples/3. csv_read_file_row_list(File, Code signals: Prolog, GSM102447.CEL, GSM102449.CEL, GSM102451.CEL, GSM102455.CEL, GSM102507.CEL, probe_value_in_sample, Probe, Sample_Strip, ProbeValue, GSM102447, csv_read_file_row_list, GSE2109_BarCode.csv, List, Empty, ProbeList, IndexOfProbe, Sample, Samp...
well as: :- dynamic samples/3. csv_read_file_row_list(File, Code signals: Prolog, GSM102447.CEL, GSM102449.CEL, GSM102451.CEL, GSM102455.CEL, GSM102507.CEL, probe_value_in_sample, Probe, Sample_Strip, ProbeValue, GSM102447, csv_read_file_row_list, GSE2109_BarCode.csv, List, Empty, ProbeList, IndexOfProbe, Sample, Samp...
[ 0.023681640625, -0.0081787109375, 0.0267333984375, 0.03515625, -0.00799560546875, -0.006256103515625, 0.00063323974609375, 0.019287109375, 0.01495361328125, 0.01336669921875, 0, -0.018310546875, -0.00970458984375, 0.00347900390625, -0.004486083984375, -0.005279541015625, -0.005584716...
[ 5299, 237, 15772, 84079, 121413, 7, 18113, 20763, 334, 39116, 29822, 15555, 6562, 174350, 28864, 26073, 1250, 4867, 96600, 963, 2357, 13330, 85483, 155103, 11703, 502, 372, 27494, 433, 33209, 59623, 856, 50770, 454, 9127, 6463, 25267, 114211,...
[ 0.0679931640625, 0.009124755859375, 0.0386962890625, 0.2061767578125, 0.2364501953125, 0.0098876953125, 0.12890625, 0.1051025390625, 0.23046875, 0.18994140625, 0.1700439453125, 0.1688232421875, 0.1741943359375, 0.171142578125, 0.1885986328125, 0.1993408203125, 0.10491943359375, 0.2...
embed
41702732_c1
41702732
prolog
1
of the group that has exactly two non-director musicians that play the violin. So far I have this hasTwoViolinists(Initial,Surname):- group(_,musician(Initial,Surname,_),[musician(_,_,cv(_,_,violin)),musician(_,_,cv(_,_,violin))]). Which will only return a group that only has two violinists, which isn't quite what I a...
of the group that has exactly two non-director musicians that play the violin. So far I have this hasTwoViolinists(Initial,Surname):- group(_,musician(Initial,Surname,_),[musician(_,_,cv(_,_,violin)),musician(_,_,cv(_,_,violin))]). Which will only return a group that only has two violinists, which isn't quite what I a...
[ -0.01373291015625, -0.007232666015625, 0.0009918212890625, 0.0208740234375, 0.00799560546875, 0.035888671875, -0.0284423828125, -0.0081787109375, 0.00482177734375, -0.003509521484375, 0.02587890625, 0.01312255859375, 0.00738525390625, 0.01531982421875, -0.0152587890625, 0.0106201171875...
[ 111, 21115, 1556, 66161, 6626, 351, 80581, 748, 19612, 72004, 11301, 44755, 73, 2060, 765, 903, 3613, 6609, 60768, 64370, 1890, 84041, 11627, 94922, 3378, 334, 158993, 4734, 30646, 32233, 16487, 100, 4358, 186, 77947, 28864, 26073, 7, 11249...
[ 0.030975341796875, 0.218505859375, 0.07269287109375, 0.0838623046875, 0.1925048828125, 0.13330078125, 0.0863037109375, 0.04473876953125, 0.09063720703125, 0.125244140625, 0.1146240234375, 0.2359619140625, 0.1707763671875, 0.031402587890625, 0.007965087890625, 0.050750732421875, 0.112...
embed
47500158_c1
47500158
prolog
1
[4, 5, 6], [4]) ? creep Exit: (11) > intersect([4, 5, 6, 7, 8], [4, 5, 6], []) ? creep Exit: (10) > intersect([3, 4, 5, 6, 7, 8], [4, 5, 6], []) ? creep Exit: (9) > intersect([2, 3, 4, 5, 6, 7, 8], [4, 5, 6], []) ? creep Exit: (8) > intersect([1, 2, 3, 4, 5, 6, 7, 8], [4, 5, 6], []) ? creep Note how at the Call the va...
[4, 5, 6], [4]) ? creep Exit: (11) > intersect([4, 5, 6, 7, 8], [4, 5, 6], []) ? creep Exit: (10) > intersect([3, 4, 5, 6, 7, 8], [4, 5, 6], []) ? creep Exit: (9) > intersect([2, 3, 4, 5, 6, 7, 8], [4, 5, 6], []) ? creep Exit: (8) > intersect([1, 2, 3, 4, 5, 6, 7, 8], [4, 5, 6], []) ? creep Note how at the Call the va...
[ 0.01153564453125, 0.00738525390625, 0.023193359375, 0.0167236328125, 0.0089111328125, 0.0252685546875, -0.01495361328125, -0.018798828125, 0.004608154296875, -0.01361083984375, 0.00171661376953125, 0.006072998046875, -0.009765625, 0.026123046875, 0.0244140625, -0.009521484375, 0.0155...
[ 617, 4, 190, 305, 59535, 705, 49512, 254, 5443, 217, 12, 21282, 977, 1940, 7, 24762, 361, 382, 17857, 363, 201, 11438, 304, 138, 10021, 132, 116, 18622, 3642, 99, 26265, 34292, 111, 313, 1556, 2809, 14037, 26785, 33306, 237, 82230, 19...
[ 0.1873779296875, 0.025177001953125, 0.1883544921875, 0.17724609375, 0.120361328125, 0.0654296875, 0.2181396484375, 0.1605224609375, 0.1693115234375, 0.193115234375, 0.027801513671875, 0.1644287109375, 0.01080322265625, 0.1861572265625, 0.1995849609375, 0.20458984375, 0.0997314453125,...
embed
50056131_c0
50056131
prolog
0
Title: Taking the Max and Min of a list and calculate the difference in Prolog Problem title: Taking the Max and Min of a list and calculate the difference in Prolog Tags: recursion, prolog Problem: Taking the Max and Min of a list and calculate the difference in Prolog Having trouble getting the code to work. I feel l...
Taking the Max and Min of a list and calculate the difference in Prolog Taking the Max and Min of a list and calculate the difference in Prolog recursion prolog Taking Max Min Prolog dia1 H-H1 Example Taking the Max and Min of a list and calculate the difference in Prolog Having trouble getting the code to work. I feel...
[ 0.00830078125, 0.0018310546875, 0.02734375, 0.005340576171875, -0.00927734375, 0.00083160400390625, 0.009521484375, 0.027099609375, 0.0250244140625, -0.0133056640625, -0.0027923583984375, -0.0205078125, -0.00567626953125, 0.02001953125, 0.03759765625, -0.00958251953125, 0.02038574218...
[ 2561, 9920, 136, 4211, 111, 5303, 74481, 60212, 1250, 4867, 195625, 1830, 502, 214, 879, 418, 572, 841, 89536, 70, 63134, 18151, 4488, 12319, 31089, 4358, 56, 32354, 149016, 121742 ]
[ 0.1019287109375, 0.2066650390625, 0.126953125, 0.26123046875, 0.009002685546875, 0.1619873046875, 0.161376953125, 0.210693359375, 0.1336669921875, 0.2470703125, 0.15283203125, 0.015350341796875, 0.0902099609375, 0.005828857421875, 0.1341552734375, 0.047393798828125, 0.037750244140625...
embed
34807625_c1
34807625
prolog
1
by in_order//1 ? Right now, I get ... ?- lazy_chain(Zs, #<), phrase (in_order(node(1,nil,nil)), Zs0,Zs). Zs0 = [1|Zs], freeze(Zs, lazy_chain_aux(Zs,#<)). ... which (of course) can fail upon further instantiation of Zs : ?- lazy_chain(Zs, #<), phrase(in_order(node(1,nil,nil)), Zs0,Zs), Zs = [3,2,1]. false . How can I w...
by in_order//1 ? Right now, I get ... ?- lazy_chain(Zs, #<), phrase (in_order(node(1,nil,nil)), Zs0,Zs). Zs0 = [1|Zs], freeze(Zs, lazy_chain_aux(Zs,#<)). ... which (of course) can fail upon further instantiation of Zs : ?- lazy_chain(Zs, #<), phrase(in_order(node(1,nil,nil)), Zs0,Zs), Zs = [3,2,1]. false . How can I w...
[ -0.00390625, -0.001312255859375, 0.01025390625, 0.006988525390625, 0.017578125, 0.016357421875, 0.0106201171875, -0.01806640625, 0.025634765625, -0.033203125, 0.0022125244140625, 0.007720947265625, 0.0036773681640625, -0.000583648681640625, 0.0162353515625, 0.01470947265625, -0.01397...
[ 390, 23, 80596, 11583, 5036, 2046, 21, 3285, 115097, 1511, 7, 16093, 113860, 73, 157, 112, 17324, 567, 2389, 2203, 4092, 731, 10442, 831, 35782, 53333, 34648, 14, 76172, 98320, 4488, 10932, 158, 2816, 5303, 428, 18234, 6620, 28864, 26073,...
[ 0.055145263671875, 0.10552978515625, 0.197509765625, 0.1220703125, 0.02801513671875, 0.003814697265625, 0.14697265625, 0.211181640625, 0.2034912109375, 0.1279296875, 0.087646484375, 0.127197265625, 0.1883544921875, 0.087646484375, 0.1192626953125, 0.09521484375, 0.117919921875, 0.1...
embed
62116016_c0
62116016
prolog
0
Title: How to draw SLD tree for this query Problem title: How to draw SLD tree for this query Tags: prolog, logic-programming, sld-resolution Problem: How to draw SLD tree for this query a ↔ b ↙ ↑ c → d path(X, X, Y). path(X, Y, s(Z)) :- edge(X, A), path(A, Y, Z). path(X, Y, Z) :- eps(X, A), path(A, Y, Z). edge(a, b). ...
How to draw SLD tree for this query How to draw SLD tree for this query prolog logic-programming sld-resolution How SLD How to draw SLD tree for this query a ↔ b ↙ ↑ c → d And path(X,Y,k) is true if there is a path from X to Y in the graph where at most k non-ℇ-edges are used along the path. How can I draw an SLD tree ...
[ 0.0191650390625, 0.01904296875, -0.0120849609375, 0.006561279296875, -0.0216064453125, 0.008056640625, -0.026123046875, -0.014404296875, 0.0040283203125, -0.00836181640625, 0.0011138916015625, 0.00970458984375, -0.018798828125, 0.010498046875, 0.013427734375, 0.003997802734375, 0.005...
[ 11249, 47, 79442, 159, 30693, 53201, 100, 903, 41, 1294, 502, 4867, 62775, 28966, 91, 7344, 107, 166589, 10, 243542, 876, 245047, 7381, 501, 2863, 104, 60875, 1542, 1723, 92, 83, 29568, 2174, 1295, 1193, 990, 41382, 2684, 472, 351, 297,...
[ 0.09002685546875, 0.126953125, 0.2103271484375, 0.12841796875, 0.278076171875, 0.288818359375, 0.0921630859375, 0.09375, 0.1309814453125, 0.0941162109375, 0.1097412109375, 0.1650390625, 0.0877685546875, 0.07916259765625, 0.09130859375, 0.2005615234375, 0.0748291015625, 0.1448974609...
embed
40825659_c1
40825659
prolog
1
')). :- assert(data_disk(book2, 'Yes')). :- assert(data_disk(book3, 'Yes')). :- assert(data_disk(book4, 'No')). As you can see the facts are in a certain order book1 book2 book3 book4 How can I get the last X, where X is bookX, and increment by 1 so that the new book to be inserted will always be (X+1)? Code signals: H...
')). :- assert(data_disk(book2, 'Yes')). :- assert(data_disk(book3, 'Yes')). :- assert(data_disk(book4, 'No')). As you can see the facts are in a certain order book1 book2 book3 book4 How can I get the last X, where X is bookX, and increment by 1 so that the new book to be inserted will always be (X+1)? Code signals: H...
[ 0.0115966796875, 0.021728515625, -0.004241943359375, 0.0269775390625, -0.0021514892578125, 0.0284423828125, -0.005340576171875, -0.00555419921875, 0.0035400390625, -0.01507568359375, 0.01043701171875, -0.01373291015625, -0.00897216796875, -0.01318359375, 0.0242919921875, -0.00988769531...
[ 242, 16, 194, 15772, 237, 33657, 10135, 37623, 14137, 304, 91480, 363, 617, 5021, 831, 1957, 70, 15824, 23, 24233, 12989, 12877, 418, 11249, 87, 2046, 4568, 1193, 7440, 83, 1542, 158661, 106, 221, 3525, 47, 186, 183540, 297, 1221, 11343...
[ 0.03497314453125, 0.046875, 0.08392333984375, 0.0269775390625, 0.05059814453125, 0.1961669921875, 0.1165771484375, 0.149169921875, 0.163330078125, 0.142578125, 0.16845703125, 0.124755859375, 0.201904296875, 0.086669921875, 0.0791015625, 0.09912109375, 0.0283355712890625, 0.18566894...
embed
12830029_c0
12830029
prolog
0
Title: Comparing prolog anonymous variables Problem title: Comparing prolog anonymous variables Tags: prolog, prolog-anonymous-variable Problem: Comparing prolog anonymous variables I have a series of facts in prolog that contain the anonymous variable _ . fact(a, _). fact(b, _). fact(c, _). and i have some rules that ...
Comparing prolog anonymous variables Comparing prolog anonymous variables prolog prolog-anonymous-variable Comparing Comparing prolog anonymous variables I have a series of facts in prolog that contain the anonymous variable _ . and i have some rules that take in lists of these facts: however this is not working. The r...
[ 0.0206298828125, -0.01141357421875, -0.00130462646484375, 0.0030364990234375, 0.016357421875, -0.019775390625, 0.01336669921875, 0.01312255859375, 0.00958251953125, -0.006195068359375, 0.01153564453125, -0.0034637451171875, 0.002288818359375, 0.003082275390625, -0.0030059814453125, -0....
[ 113307, 502, 4867, 52184, 10821, 77336, 66, 45757, 21690, 2886, 15824, 70541, 91736, 5303, 903, 959, 20697, 79986, 11015, 5117, 70731, 572, 69112, 11, 101, 20594, 44691, 12921, 39933, 28, 161789 ]
[ 0.15966796875, 0.1456298828125, 0.216796875, 0.195068359375, 0.050994873046875, 0.2025146484375, 0.04833984375, 0.1585693359375, 0.142578125, 0.030975341796875, 0.1441650390625, 0.061279296875, 0.1405029296875, 0.0833740234375, 0.010009765625, 0.0655517578125, 0.1212158203125, 0.14...
embed
38292522_c0
38292522
prolog
0
Title: Web access of Prolog database Problem title: Web access of Prolog database Tags: database-connection, prolog Problem: Web access of Prolog database Is it possible to use Prolog as a database and host it on internet servers for users to access it over the web. There needs to be a html forms page where users can e...
Web access of Prolog database Web access of Prolog database database-connection prolog Web Prolog Web access of Prolog database Is it possible to use Prolog as a database and host it on internet servers for users to access it over the web. There needs to be a html forms page where users can enter data. In addition, the...
[ 0.0517578125, 0.0283203125, -0.001251220703125, -0.00040435791015625, -0.01043701171875, 0.02587890625, -0.008056640625, -0.007568359375, -0.008056640625, -0.07470703125, 0.015625, -0.009765625, -0.0179443359375, -0.003082275390625, 0.0086669921875, -0.005096435546875, 0.000307083129...
[ 4002, 17203, 111, 1250, 4867, 63399, 135457, 502, 2071, 442, 7722, 4527, 237, 27980, 1820, 10723, 72095, 645, 1467, 27117, 7693, 3173, 9191, 30957, 2053, 38937, 41, 57553, 2965, 69307, 169581 ]
[ 0.1395263671875, 0.175048828125, 0.037109375, 0.18701171875, 0.287353515625, 0.243408203125, 0.06585693359375, 0.1136474609375, 0.0222320556640625, 0.00311279296875, 0.148193359375, 0.10986328125, 0.111083984375, 0.13037109375, 0.085205078125, 0.109130859375, 0.0889892578125, 0.040...
embed
40568206_c0
40568206
prolog
0
Title: Prolog function removeSecond which removes the second element of a given list. For example: Problem title: Prolog function removeSecond which removes the second element of a given list. For example: Tags: prolog Problem: Prolog function removeSecond which removes the second element of a given list. For example: ...
Prolog function removeSecond which removes the second element of a given list. For example: Prolog function removeSecond which removes the second element of a given list. For example: prolog Prolog Returns Prolog function removeSecond which removes the second element of a given list. For example: this is my code but I ...
[ 0.0189208984375, 0.021728515625, 0.0091552734375, 0.018310546875, -0.010498046875, 0.009033203125, -0.020263671875, 0.00055694580078125, 0.0029296875, -0.00909423828125, 0.0203857421875, 0.01123046875, -0.015380859375, -0.01409912109375, 0.00457763671875, 0.00592041015625, 0.01794433...
[ 1250, 4867, 32354, 87388, 4233, 2271, 71, 3129, 7, 17932, 12830, 111, 34475, 5303, 27781, 502, 173340, 18151, 959, 30646, 50339, 44841 ]
[ 0.169921875, 0.265869140625, 0.17529296875, 0.2095947265625, 0.1387939453125, 0.207763671875, 0.135009765625, 0.014007568359375, 0.037567138671875, 0.157470703125, 0.150146484375, 0.0197601318359375, 0.035980224609375, 0.1427001953125, 0.039703369140625, 0.13671875, 0.1097412109375, ...
embed
28778023_c0
28778023
prolog
0
Title: Prolog: handling null cases Problem title: Prolog: handling null cases Tags: prolog, null Problem: Prolog: handling null cases How do you handle null cases like this in prolog? Here's the code: var_name([], []). var_name([_|[X|_]], X). My desired result, ?- var_name([1,[2,x]],X). X = [2,x]. and ?- var_name([3],X...
Prolog: handling null cases Prolog: handling null cases prolog null Prolog var_name Prolog: handling null cases How do you handle null cases like this in prolog? Here's the code: My desired result, and But when I run the code, I have problems achieving the second result.It fails and return false. I can't seem to unders...
[ 0.0244140625, -0.0142822265625, 0.01483154296875, 0.005096435546875, -0.0162353515625, 0.034912109375, 0.00738525390625, -0.004425048828125, 0.0126953125, -0.01239013671875, 0.015869140625, -0.006866455078125, -0.007354736328125, 0.0021820068359375, 0.016357421875, -0.01806640625, 0....
[ 1250, 4867, 45064, 56574, 50218, 12, 502, 285, 11627, 34831, 1884, 903, 23, 18151, 104851, 71, 16750, 11675, 44402, 55391, 17932, 35782, 30646, 98320, 28219, 44691, 1653, 2063, 83, 5 ]
[ 0.1376953125, 0.2364501953125, 0.1474609375, 0.2396240234375, 0.18408203125, 0.0205078125, 0.1307373046875, 0.1368408203125, 0.1563720703125, 0.158935546875, 0.05877685546875, 0.04388427734375, 0.0228729248046875, 0.1243896484375, 0.06793212890625, 0.02545166015625, 0.110107421875, ...
embed
5734648_c0
5734648
prolog
0
Title: Representation and heuristic of Connect6 game in Prolog Problem title: Representation and heuristic of Connect6 game in Prolog Tags: prolog, heuristics, game-ai, artificial-intelligence Problem: Representation and heuristic of Connect6 game in Prolog I want to represent game connect6 wiki (maybe predicate stone(...
Representation and heuristic of Connect6 game in Prolog Representation and heuristic of Connect6 game in Prolog prolog heuristics game-ai artificial-intelligence Representation Connect6 Prolog Representation and heuristic of Connect6 game in Prolog I want to represent game connect6 wiki (maybe predicate stone(P, X, Y),...
[ 0.023193359375, -0.007781982421875, 0.0213623046875, 0.006378173828125, 0.004730224609375, 0.01361083984375, 0.005706787109375, -0.01129150390625, -0.0157470703125, -0.044677734375, 0.02197265625, 0.00836181640625, -0.01385498046875, -0.00250244140625, 0.009765625, -0.00186920166015625...
[ 130877, 1363, 136, 764, 474, 48242, 111, 62448, 910, 6712, 23, 1250, 4867, 502, 62210, 508, 66733, 130687, 3444, 33636, 37067, 34356, 1653, 2063, 34165, 683, 1193, 990, 436, 58585, 1723, 552, 6651, 2806, 4127, 4527, 86869, 2967, 3249, 233...
[ 0.2125244140625, 0.0308074951171875, 0.041717529296875, 0.08203125, 0.1707763671875, 0.1566162109375, 0.018646240234375, 0.1947021484375, 0.1873779296875, 0.13134765625, 0.0548095703125, 0.1368408203125, 0.2261962890625, 0.09307861328125, 0.1695556640625, 0.14404296875, 0.09765625, ...
embed
31652482_c2
31652482
prolog
2
,3,3],[aron,building1,3,4],[aron,building1,3,5]], F3 > F2, F3>F1, F2 == F4, R5 == R6-1, F5 == F4+1, (F4 == 3, R4 == 5;F5 == 3, R5 == 5; F6 == 3, R6 == 5), del([dana,building1,F1,R1],L,List1), del([noah,building1,F2,R2],List1,List2), del([joni,building1,F3,R3],List2,List3), del([gale,building2,F4,R4],List3,List4), del([...
,3,3],[aron,building1,3,4],[aron,building1,3,5]], F3 > F2, F3>F1, F2 == F4, R5 == R6-1, F5 == F4+1, (F4 == 3, R4 == 5;F5 == 3, R5 == 5; F6 == 3, R6 == 5), del([dana,building1,F1,R1],L,List1), del([noah,building1,F2,R2],List1,List2), del([joni,building1,F3,R3],List2,List3), del([gale,building2,F4,R4],List3,List4), del([...
[ -0.001312255859375, 0.0169677734375, -0.0185546875, 0.006103515625, -0.00421142578125, 0.0062255859375, -0.01202392578125, 0.004425048828125, 0.00482177734375, -0.005706787109375, 0.0205078125, 0.0179443359375, 0.007293701171875, 0.001708984375, -0.005279541015625, 0.0072021484375, -...
[ 6, 363, 96386, 4, 36901, 146049, 82449, 92714, 86245, 563, 977, 304, 919, 418, 69112, 617, 627, 758, 126188, 21748, 138, 190, 910, 21162, 146, 132, 15586, 866, 154663, 157, 1366, 513, 93, 55525, 1900, 1052, 43317, 1542, 17727, 87388, 5,...
[ 0.0772705078125, 0.128173828125, 0.1162109375, 0.017486572265625, 0.1802978515625, 0.20263671875, 0.134521484375, 0.166748046875, 0.009735107421875, 0.1190185546875, 0.0479736328125, 0.07965087890625, 0.093505859375, 0.060760498046875, 0.04803466796875, 0.1029052734375, 0.06561279296...
embed
53047132_c0
53047132
prolog
0
Title: Prolog - unifying two lists with/without variables Problem title: Prolog - unifying two lists with/without variables Tags: list, prolog, unification, variables Problem: Prolog - unifying two lists with/without variables This Prolog code returns: ?- [a,b,c,d] = [a|[b,c,d]]. true and this one ?- [X,Y] = [a|[b,c,d]...
Prolog - unifying two lists with/without variables Prolog - unifying two lists with/without variables list prolog unification variables Prolog Prolog - unifying two lists with/without variables This Prolog code returns: true and this one returns false. I am not totally grasping why [X, Y] is false. Trace is not helpful...
[ 0.03076171875, 0.03076171875, 0.0164794921875, 0.0006103515625, -0.0185546875, 0.006866455078125, -0.01434326171875, 0.006195068359375, 0.01025390625, -0.0028076171875, 0.00921630859375, 0.0157470703125, 0.0025787353515625, -0.004638671875, 0.00084686279296875, -0.00653076171875, 0.0...
[ 1250, 4867, 51, 151138, 6626, 5303, 678, 6056, 77336, 76228, 502, 41274, 18151, 30646, 29568, 136, 903, 1632, 98320, 27689, 10366, 15400, 1542, 4, 990, 83, 98893, 41206, 25632, 95486, 674, 16401, 63805, 4865, 14602, 58745, 54, 30338, 988, ...
[ 0.1605224609375, 0.256591796875, 0.1624755859375, 0.1068115234375, 0.1036376953125, 0.178955078125, 0.0509033203125, 0.077880859375, 0.190185546875, 0.00543212890625, 0.10693359375, 0.097900390625, 0.146240234375, 0.151123046875, 0.2138671875, 0.07012939453125, 0.06927490234375, 0....
embed
65481110_c0
65481110
prolog
0
Title: Expressing numerical constraints using Prolog without CLP(FD) Problem title: Expressing numerical constraints using Prolog without CLP(FD) Tags: prolog Problem: Expressing numerical constraints using Prolog without CLP(FD) ordering(A, B, C) :- integer(A), integer(B), integer(C), A > B, B > C, A > 0, 10 > C. is s...
Expressing numerical constraints using Prolog without CLP(FD) Expressing numerical constraints using Prolog without CLP(FD) prolog Prolog Expressing CLP Expressing numerical constraints using Prolog without CLP(FD) is satisfied by ordering(3,2,1). . But when I leave one or more as variables ordering(3,X,1). it evaluate...
[ 0.01483154296875, -0.0022735595703125, 0.005523681640625, 0.01031494140625, 0.00927734375, 0.01318359375, -0.021728515625, -0.0162353515625, -0.00494384765625, -0.0164794921875, -0.02001953125, -0.005279541015625, -0.0108642578125, -0.003997802734375, 0.01434326171875, -0.005859375, ...
[ 25129, 54744, 158, 2816, 4288, 17368, 1250, 4867, 15490, 37352, 98553, 6827, 502, 214521, 12989, 214, 86827, 304, 17727, 3229, 31358, 1632, 1286, 77336, 1542, 151575, 47, 98320, 132283 ]
[ 0.1470947265625, 0.131591796875, 0.086669921875, 0.184814453125, 0.088134765625, 0.0158538818359375, 0.1490478515625, 0.2322998046875, 0.0833740234375, 0.2125244140625, 0.134033203125, 0.005828857421875, 0.1060791015625, 0.1865234375, 0.2156982421875, 0.1092529296875, 0.0602722167968...
embed
22702001_c0
22702001
prolog
0
Title: Quick PROLOG enquiry Problem title: Quick PROLOG enquiry Tags: prolog Problem: Quick PROLOG enquiry I have predicates as follows dur(a,1). dur(b,2). dur(c,3). dur(d,4). Say I want to add the elements of a list [a,b,c] so sum = 6. How do I access the value associated with the variable? Because something like this...
Quick PROLOG enquiry Quick PROLOG enquiry prolog Quick PROLOG Sum Rest Quick PROLOG enquiry I have predicates as follows Say I want to add the elements of a list [a,b,c] so sum = 6. How do I access the value associated with the variable? Because something like this doesn't work, it works fine for [1,2,3] but not at all...
[ -0.00144195556640625, 0.0177001953125, 0.0244140625, 0.0172119140625, -0.0174560546875, 0.007415771484375, 0.003326416015625, 0.034423828125, 0.022705078125, -0.05615234375, -0.01092529296875, -0.01483154296875, -0.006439208984375, -0.0185546875, -0.004425048828125, 0.00537109375, -0...
[ 89038, 10514, 47510, 22, 3181, 1294, 502, 4867, 36335, 49756, 87, 765, 1653, 2063, 1636, 25916, 3444, 47, 15190, 80854, 111, 5303, 11, 275, 238, 10554, 2203, 2289, 11249, 54, 17203, 70, 34292, 137272, 678, 77336, 18, 4488, 43240, 5885, ...
[ 0.16845703125, 0.1590576171875, 0.238525390625, 0.044097900390625, 0.1593017578125, 0.0231170654296875, 0.1173095703125, 0.2041015625, 0.225341796875, 0.1737060546875, 0.031280517578125, 0.0258026123046875, 0.1453857421875, 0.1597900390625, 0.097412109375, 0.0150909423828125, 0.14428...
embed
63794026_c0
63794026
prolog
0
Title: How to take procedure as input in prolog Problem title: How to take procedure as input in prolog Tags: prolog Problem: How to take procedure as input in prolog I am doing a assignment in Prolog. I want to give some procedure as input instead of writing them in code. For example, currently: My code is: friends(aa...
How to take procedure as input in prolog How to take procedure as input in prolog prolog How How to take procedure as input in prolog I am doing a assignment in Prolog. I want to give some procedure as input instead of writing them in code. For example, currently: My code is: and my input command is and output is .... ...
[ 0.000823974609375, 0.00274658203125, -0.003997802734375, 0.0228271484375, -0.0230712890625, 0.0030364990234375, 0.0025787353515625, 0.0169677734375, 0.0020751953125, -0.0888671875, -0.0135498046875, 0.0050048828125, -0.029296875, -0.00145721435546875, 0.01611328125, 0.00048828125, 0....
[ 11249, 47, 5646, 50491, 237, 107730, 23, 502, 4867, 95486, 674, 1250, 3444, 8337, 64457, 32562, 18151, 82424, 83, 75101, 140992, 22013, 759, 186, 903, 3642, 23902, 2046, 5701 ]
[ 0.0869140625, 0.0301666259765625, 0.153076171875, 0.308349609375, 0.1441650390625, 0.271728515625, 0.0645751953125, 0.1485595703125, 0.2379150390625, 0.11279296875, 0.039276123046875, 0.124755859375, 0.06353759765625, 0.0869140625, 0.069580078125, 0.06390380859375, 0.1572265625, 0....
embed
55931676_c0
55931676
prolog
0
Title: Splitting list into sorted sublists (Prolog) Problem title: Splitting list into sorted sublists (Prolog) Tags: prolog Problem: Splitting list into sorted sublists (Prolog) How can I divide a list [5,4,2,8,3,1,6,9,5] into a list of sub-lists that would be split at the values that break the sequence? For example a...
Splitting list into sorted sublists (Prolog) Splitting list into sorted sublists (Prolog) prolog Splitting Prolog Splitting list into sorted sublists (Prolog) How can I divide a list [5,4,2,8,3,1,6,9,5] into a list of sub-lists that would be split at the values that break the sequence? For example a list [5,4,2,8,3,1,6...
[ 0.0002994537353515625, 0.0032806396484375, 0.0107421875, -0.0120849609375, -0.0220947265625, 0.016845703125, -0.0174560546875, -0.00811767578125, -0.00823974609375, -0.0004024505615234375, -0.0002994537353515625, 0.0194091796875, -0.019775390625, 0.013671875, 0.0155029296875, 0.0060119...
[ 46474, 1916, 5303, 3934, 17497, 71, 1614, 6562, 7, 10752, 4867, 502, 1250, 11249, 831, 87, 101637, 10, 758, 617, 185723, 363, 163090, 93754, 9, 2806, 65450, 99, 142424, 36356, 40, 944, 3956, 27781, 5608, 11180, 19388, 1884, 83914, 59535, ...
[ 0.2318115234375, 0.089599609375, 0.2381591796875, 0.1602783203125, 0.2047119140625, 0.113525390625, 0.2337646484375, 0.2646484375, 0.03466796875, 0.118896484375, 0.2139892578125, 0.0985107421875, 0.1427001953125, 0.0635986328125, 0.072265625, 0.026336669921875, 0.2171630859375, 0.0...
embed
72831234_c0
72831234
prolog
0
Title: Prime numbers Prolog Problem title: Prime numbers Prolog Tags: list, prolog Problem: Prime numbers Prolog I have written Prolog code to (try) find prime numbers between 0 and N. I am however unable to filter out composite numbers. Any advice would be great. check(N, 2) :- N mod 2 =:= 0. plist(N, List) :- X>1, fi...
Prime numbers Prolog Prime numbers Prolog list prolog Prime Prolog List Tail1 Tail2 Prime numbers Prolog I have written Prolog code to (try) find prime numbers between 0 and N. I am however unable to filter out composite numbers. Any advice would be great.
[ -0.0108642578125, 0.00897216796875, 0.017333984375, 0.004974365234375, 0.01031494140625, 0.0289306640625, 0.0089111328125, -0.0169677734375, 0.01904296875, -0.0142822265625, 0.005462646484375, -0.0031890869140625, 0.000339508056640625, -0.0003795623779296875, -0.01043701171875, 0.02294...
[ 56195, 101935, 1250, 4867, 5303, 502, 32036, 1218, 379, 418, 304, 59121, 18151, 47, 15123, 7413, 20809, 17721, 757, 136, 541, 49903, 51, 2886, 46312, 1810, 375, 77087, 67660, 2806, 6782, 5 ]
[ 0.2188720703125, 0.213623046875, 0.19677734375, 0.2303466796875, 0.13134765625, 0.13037109375, 0.11187744140625, 0.0916748046875, 0.11065673828125, 0.062103271484375, 0.099609375, 0.085693359375, 0.146728515625, 0.01042938232421875, 0.064453125, 0.12017822265625, 0.2078857421875, 0...
embed
40173981_c0
40173981
prolog
0
Title: Can I prepend the argument list in call/2? Problem title: Can I prepend the argument list in call/2? Tags: meta-predicate, prolog Problem: Can I prepend the argument list in call/2? call(Goal,Arg) allows to append the argument Arg to the arguments of Goal and call the resulting goal, e.g. call(succ(1), R). is th...
Can I prepend the argument list in call/2? Can I prepend the argument list in call/2? meta-predicate prolog Can Can I prepend the argument list in call/2? call(Goal,Arg) allows to append the argument Arg to the arguments of Goal and call the resulting goal, e.g. is the same as However, I don't want to append to the arg...
[ 0.00104522705078125, 0.0234375, 0.00933837890625, 0.005859375, -0.00830078125, -0.006378173828125, 0.0123291015625, 0.00116729736328125, 0.004791259765625, -0.042236328125, 0.0118408203125, 0.0032958984375, -0.03125, 0.0020599365234375, 0.010986328125, -0.00848388671875, -0.009399414...
[ 4171, 64503, 3611, 10750, 5303, 23, 11782, 12477, 87, 23550, 19714, 2063, 502, 4867, 70, 17903, 289, 7614, 177, 114864, 114689, 71, 1172, 47, 2016, 16750, 69236, 5701, 3444, 5608, 831, 7 ]
[ 0.064697265625, 0.1676025390625, 0.1954345703125, 0.24560546875, 0.1907958984375, 0.036895751953125, 0.1795654296875, 0.2021484375, 0.0323486328125, 0.087890625, 0.0390625, 0.060272216796875, 0.0631103515625, 0.111572265625, 0.0030517578125, 0.1290283203125, 0.0875244140625, 0.0997...
embed
30125138_c0
30125138
prolog
0
Title: Can someone please help explain this copy function works? Problem title: Can someone please help explain this copy function works? Tags: copy, list, prolog, recursion Problem: Can someone please help explain this copy function works? copyList([], []). % base case copyList([H|T], [H|R]) :- copyList(T, R). I "sort...
Can someone please help explain this copy function works? Can someone please help explain this copy function works? copy list prolog recursion Can Can someone please help explain this copy function works? I "sort of" understand how recursion works, but when I analysed this function, I got really confused. Can someone p...
[ 0.0086669921875, 0.01446533203125, -0.00009489059448242188, 0.0162353515625, -0.00634765625, -0.00677490234375, -0.00408935546875, -0.00188446044921875, 0.003326416015625, -0.0029296875, 0.01708984375, -0.0106201171875, -0.0179443359375, 0.0179443359375, 0.0137939453125, 0.001121520996...
[ 4171, 22008, 22936, 4358, 73342, 903, 43658, 32354, 43240, 5303, 502, 4867, 195625, 1830, 62351, 111, 28219, 3642, 51422, 6183, 55681, 5281, 29954, 1272, 95528, 2367, 96276, 23, 58359, 3564, 27781, 35064 ]
[ 0.025146484375, 0.041778564453125, 0.05926513671875, 0.078369140625, 0.1556396484375, 0.081298828125, 0.2373046875, 0.1923828125, 0.1732177734375, 0.1627197265625, 0.1221923828125, 0.1861572265625, 0.2093505859375, 0.1644287109375, 0.0153045654296875, 0.02117919921875, 0.066711425781...
embed
54677136_c0
54677136
prolog
0
Title: Can I use integers as parameters? Problem title: Can I use integers as parameters? Tags: prolog Problem: Can I use integers as parameters? How can I know if a person X is descendant of a person Y given the descendancy degree? I've tried this: descendant(X, Y, 1) :- son(X, Y). descendant(X, Y, Degree) :- son(X, Z...
Can I use integers as parameters? Can I use integers as parameters? prolog Can Degree Degree-1 Can I use integers as parameters? How can I know if a person X is descendant of a person Y given the descendancy degree? I've tried this: Where son(X, Y) returns yes if X is son of Y. If Degree == 1 it returns the correct ans...
[ -0.00762939453125, -0.0072021484375, 0.004730224609375, 0.0213623046875, -0.00182342529296875, 0.0123291015625, -0.00457763671875, -0.003631591796875, 0.007415771484375, -0.0306396484375, 0.00933837890625, -0.01165771484375, -0.01251220703125, 0.0233154296875, 0.0157470703125, -0.02587...
[ 4171, 87, 4527, 892, 26255, 237, 171859, 7, 502, 4867, 262, 7134, 13, 5759, 11249, 831, 3714, 2174, 3445, 1193, 83, 60887, 1236, 111, 990, 34475, 66, 2408, 79385, 37842, 903, 775, 1542, 30646, 72272, 69112, 106, 26785, 35166, 4958, 6, ...
[ 0.110107421875, 0.09796142578125, 0.1705322265625, 0.1959228515625, 0.1922607421875, 0.126708984375, 0.265869140625, 0.12939453125, 0.07977294921875, 0.12255859375, 0.0579833984375, 0.1417236328125, 0.01263427734375, 0.1541748046875, 0.01025390625, 0.066162109375, 0.156982421875, 0...
embed
37562539_c0
37562539
prolog
0
Title: Alias for &#x27;is&#x27; in Prolog Problem title: Alias for &#x27;is&#x27; in Prolog Tags: prolog, swi-prolog Problem: Alias for 'is' in Prolog I'd like to be able to create a symbolic alias for the is operator in prolog that can also be used with pack func. So far, I have this: :- use_module(library(func)). :- ...
Alias for &#x27;is&#x27; in Prolog Alias for &#x27;is&#x27; in Prolog prolog swi-prolog Alias Prolog use_module Alias for 'is' in Prolog I'd like to be able to create a symbolic alias for the is operator in prolog that can also be used with pack func. So far, I have this: I can run queries like: But can't run something...
[ 0.01019287109375, 0.000431060791015625, 0.0311279296875, -0.0018463134765625, -0.0103759765625, 0.02001953125, 0.000049114227294921875, 0.0028839111328125, 0.0147705078125, -0.03955078125, 0.0084228515625, 0.0185546875, 0.0101318359375, -0.00140380859375, 0, 0.01153564453125, -0.0048...
[ 2132, 162, 100, 3768, 164, 23, 1250, 4867, 502, 2452, 3454, 4527, 83279, 1884, 19048, 28282, 128201, 238, 55109, 83, 39933, 11814, 43824, 7477, 831, 11675, 41, 10484, 18, 6002, 86531, 18499, 468, 136, 3650, 20697, 25842 ]
[ 0.175048828125, 0.1865234375, 0.054718017578125, 0.1195068359375, 0.22705078125, 0.053070068359375, 0.1651611328125, 0.2451171875, 0.131103515625, 0.1142578125, 0.120849609375, 0.051513671875, 0.1141357421875, 0.0738525390625, 0.000244140625, 0.078857421875, 0.1534423828125, 0.0136...
embed
43684093_c0
43684093
prolog
0
Title: How to print all primes which are not greater than the given positive integer N? Problem title: How to print all primes which are not greater than the given positive integer N? Tags: list, prolog Problem: How to print all primes which are not greater than the given positive integer N? How to print all primes whi...
How to print all primes which are not greater than the given positive integer N? How to print all primes which are not greater than the given positive integer N? list prolog How How to print all primes which are not greater than the given positive integer N? How to print all primes which are not greater than the given ...
[ -0.0203857421875, -0.0036163330078125, 0.0196533203125, 0.0032806396484375, 0.0123291015625, 0.025634765625, 0.005828857421875, -0.01275634765625, 0.006439208984375, 0.0022430419921875, -0.0025482177734375, -0.01007080078125, 0.0021209716796875, -0.00537109375, 0, -0.012451171875, 0....
[ 11249, 47, 28412, 756, 20809, 7, 959, 117396, 34475, 24491, 892, 541, 5303, 502, 4867, 3129, 621, 3501, 1505, 1884, 27781, 35064, 89536 ]
[ 0.076416015625, 0.05657958984375, 0.2198486328125, 0.1529541015625, 0.223876953125, 0.1192626953125, 0.175048828125, 0.1256103515625, 0.045440673828125, 0.133056640625, 0.0836181640625, 0.152099609375, 0.124267578125, 0.05718994140625, 0.122314453125, 0.0285491943359375, 0.0569458007...
embed
61310606_c1
61310606
prolog
1
([El|Sub],[El|List]):- checksublist(Sub,List). sublist([S|Sub],[L|List]):- sublist([S|Sub],List). checksublist([], L). checksublist([El|Sub],[El|List]):- checksublist(Sub,List). However, I can't formulate it in a way, so that the last element is not counted =(. According to my intuitive logic the condition checksublist...
([El|Sub],[El|List]):- checksublist(Sub,List). sublist([S|Sub],[L|List]):- sublist([S|Sub],List). checksublist([], L). checksublist([El|Sub],[El|List]):- checksublist(Sub,List). However, I can't formulate it in a way, so that the last element is not counted =(. According to my intuitive logic the condition checksublist...
[ 0.0126953125, 0.004669189453125, 0.01507568359375, 0.0031585693359375, -0.02294921875, 0.01031494140625, 0.01361083984375, 0.00567626953125, 0.02783203125, 0.011962890625, -0.005035400390625, 0.0019073486328125, 0.01190185546875, 0.01116943359375, -0.0081787109375, 0.002777099609375, ...
[ 7623, 96472, 154663, 12765, 22144, 6562, 1614, 294, 866, 339, 831, 18, 26168, 4568, 12830, 959, 54529, 297, 2203, 132, 100270, 62775, 35431, 14050, 927, 1884, 4488, 98320, 100, 26818, 3714, 3642, 2046, 31351, 111, 903, 16648, 129745, 28864,...
[ 0.1129150390625, 0.26171875, 0.1439208984375, 0.1978759765625, 0.2388916015625, 0.242919921875, 0.1572265625, 0.01690673828125, 0.053253173828125, 0.09368896484375, 0.012359619140625, 0.016998291015625, 0.1265869140625, 0.2041015625, 0.185546875, 0.11767578125, 0.1529541015625, 0.0...
embed
20614311_c0
20614311
prolog
0
Title: Maximum of list subject to condition Problem title: Maximum of list subject to condition Tags: prolog Problem: Maximum of list subject to condition I have a list as follows [[_,A,D,_,_],...] . I want to find the maximum A subject to D being equal to some value. I have written the following code, but it does not ...
Maximum of list subject to condition Maximum of list subject to condition prolog Maximum Max Maximum of list subject to condition I have a list as follows [[_,A,D,_,_],...] . I want to find the maximum A subject to D being equal to some value. I have written the following code, but it does not work. Can anyone help?
[ 0.0123291015625, -0.009765625, 0.0283203125, 0.004241943359375, -0.0004673004150390625, -0.0024871826171875, -0.0030059814453125, 0.01611328125, -0.0021514892578125, -0.00579833984375, -0.00933837890625, -0.00396728515625, -0.005035400390625, -0.0262451171875, 0.01904296875, -0.0064697...
[ 46540, 316, 111, 5303, 28368, 47, 35431, 502, 4867, 9920, 765, 28960, 284, 397, 3444, 7413, 70, 38132, 62, 391, 8035, 105950, 34292, 25632, 18151, 14602, 959, 4488, 4358 ]
[ 0.1822509765625, 0.126708984375, 0.054656982421875, 0.207763671875, 0.200927734375, 0.062103271484375, 0.227294921875, 0.06256103515625, 0.1146240234375, 0.169189453125, 0.00305938720703125, 0.026153564453125, 0.05938720703125, 0.08154296875, 0.037750244140625, 0.1002197265625, 0.021...
embed
29666230_c0
29666230
prolog
0
Title: Implementing “for(+N1,+N2,+Step,N)” in prolog Problem title: Implementing “for(+N1,+N2,+Step,N)” in prolog Tags: backtracking, prolog Problem: Implementing “for(+N1,+N2,+Step,N)” in prolog The issue is when I implement this problem : for(+N1,+N2,+Step,N) for(N1,N2,Step,N):- N1 < N2, N1S is N1 + Step, for(N1S,N2,...
Implementing “for(+N1,+N2,+Step,N)” in prolog Implementing “for(+N1,+N2,+Step,N)” in prolog backtracking prolog Implementing Step N1S Implementing “for(+N1,+N2,+Step,N)” in prolog The issue is when I implement this problem : The code i have done is : But when it runs it shows: I think that in must show after N=7; the w...
[ 0.0189208984375, 0.00160980224609375, -0.0126953125, 0.0206298828125, -0.00011968612670898438, 0.0115966796875, 0.01806640625, 0.01263427734375, 0.0169677734375, -0.0026092529296875, 0.01806640625, 0.00994873046875, -0.0191650390625, 0.01019287109375, 0.0096435546875, -0.0157470703125,...
[ 153941, 2472, 1328, 839, 418, 304, 191644, 502, 4867, 214, 4420, 125728, 50478, 541, 294, 31089, 29479, 903, 2967, 18151, 16940, 4966, 3229, 127877, 45831, 5351, 450, 23, 8110, 7639, 7103, 1369, 966, 70, 2565, 87599, 1284, 135179, 98320, ...
[ 0.2105712890625, 0.183837890625, 0.095703125, 0.16748046875, 0.10400390625, 0.154296875, 0.2296142578125, 0.1744384765625, 0.2467041015625, 0.00225830078125, 0.06591796875, 0.1790771484375, 0.1370849609375, 0.1688232421875, 0.0257568359375, 0.101806640625, 0.215087890625, 0.0009155...
embed
41128147_c1
41128147
prolog
1
C . Then, the nextr predicate checks just the latter condition. To my mind this should work just fine. Sadly -- it doesn't, as row([0,1],[0,1,1,1],2). outputs No :( EDIT: Ok, that was a stupid example I noticed. But anyways - it doesn't work on row([1,2,3],[1,2,3,4,5,6,7,8,9],1). bt it outputs Yes on row([1,2|3],[1,2,...
C . Then, the nextr predicate checks just the latter condition. To my mind this should work just fine. Sadly -- it doesn't, as row([0,1],[0,1,1,1],2). outputs No :( EDIT: Ok, that was a stupid example I noticed. But anyways - it doesn't work on row([1,2,3],[1,2,3,4,5,6,7,8,9],1). bt it outputs Yes on row([1,2|3],[1,2,...
[ 0.004364013671875, 0.0211181640625, 0.016845703125, 0.01373291015625, -0.0128173828125, -0.0069580078125, 0.0279541015625, 0.006561279296875, 0.01263427734375, -0.00909423828125, 0.0203857421875, -0.009765625, -0.0096435546875, -0.00445556640625, -0.0003070831298828125, -0.011596679687...
[ 313, 11737, 42, 1653, 2063, 67, 12765, 1660, 3055, 35431, 7086, 903, 4488, 5885, 25627, 442, 22027, 18, 15555, 2389, 76172, 418, 10461, 140992, 438, 31124, 110833, 27781, 98, 133063, 96386, 363, 80389, 136555, 145180, 17727, 32635, 2046, 12...
[ 0.114501953125, 0.1846923828125, 0.1468505859375, 0.160888671875, 0.16748046875, 0.036865234375, 0.177978515625, 0.001708984375, 0.0162353515625, 0.16943359375, 0.047760009765625, 0.054595947265625, 0.1448974609375, 0.03656005859375, 0.03509521484375, 0.038116455078125, 0.12756347656...
embed
22723448_c0
22723448
prolog
0
Title: sicstus prolog: append string to a variable&#x27;s value to create a new variable Problem title: sicstus prolog: append string to a variable&#x27;s value to create a new variable Tags: variables, prolog, string Problem: sicstus prolog: append string to a variable's value to create a new variable I was wondering ...
sicstus prolog: append string to a variable&#x27;s value to create a new variable sicstus prolog: append string to a variable&#x27;s value to create a new variable variables prolog string sicstus prolog: append string to a variable's value to create a new variable I was wondering if there's any way to append a string v...
[ 0.003265380859375, 0.00069427490234375, -0.0087890625, 0.0157470703125, 0.00872802734375, 0.006805419921875, -0.01092529296875, 0.029296875, 0.0174560546875, -0.034912109375, 0.0181884765625, 0.00665283203125, -0.01220703125, -0.005523681640625, 0.0026702880859375, -0.0162353515625, ...
[ 26536, 18253, 502, 4867, 114689, 71, 79315, 47, 77336, 3768, 34292, 28282, 3525, 149016, 2499, 3917, 47644, 3444, 65954, 765, 159, 966, 3564, 856, 95486, 361, 110680 ]
[ 0.1134033203125, 0.22216796875, 0.1282958984375, 0.202392578125, 0.156005859375, 0.10693359375, 0.25927734375, 0.13671875, 0.255859375, 0.0794677734375, 0.195556640625, 0.12646484375, 0.109375, 0.05023193359375, 0.00225830078125, 0.06158447265625, 0.0821533203125, 0.0826416015625, ...
embed
42432384_c1
42432384
prolog
1
). cantStand(pablo, fer). cantStand(fer, leo). cantStand(flor, fer). violentParty(Date):- cameToThePartyThatDay(People,Date), findall(X,member(X,People),Guests), cantStandSomeone(Guests,ThoseWhoCantStandSomeone), forall(member(Guest,Guests),member(Guest,ThoseWhoCantStandSomeone)). cantStandSomeone(Guests,List):- member...
). cantStand(pablo, fer). cantStand(fer, leo). cantStand(flor, fer). violentParty(Date):- cameToThePartyThatDay(People,Date), findall(X,member(X,People),Guests), cantStandSomeone(Guests,ThoseWhoCantStandSomeone), forall(member(Guest,Guests),member(Guest,ThoseWhoCantStandSomeone)). cantStandSomeone(Guests,List):- member...
[ 0.000759124755859375, -0.01953125, 0.0036468505859375, 0.0303955078125, -0.00750732421875, -0.003662109375, -0.0157470703125, -0.004364013671875, 0.00970458984375, -0.04541015625, -0.03271484375, -0.00531005859375, 0.01177978515625, 0.006988525390625, -0.00098419189453125, -0.024658203...
[ 6, 194, 45767, 195129, 132, 763, 12986, 4, 1592, 2875, 6279, 76352, 48673, 58229, 53, 86291, 2077, 9, 21449, 7763, 3957, 115743, 97141, 243238, 247, 7413, 5584, 1542, 27417, 22769, 525, 3630, 8364, 497, 1236, 100, 154663, 32786, 30154, 15...
[ 0.105712890625, 0.1561279296875, 0.203125, 0.27001953125, 0.0714111328125, 0.031707763671875, 0.19970703125, 0.025115966796875, 0.186767578125, 0.1402587890625, 0.16845703125, 0.1875, 0.280029296875, 0.1829833984375, 0.175048828125, 0.1575927734375, 0.05072021484375, 0.021881103515...
embed
26916076_c0
26916076
prolog
0
Title: Number of occurrences of X in the List L in prolog Problem title: Number of occurrences of X in the List L in prolog Tags: prolog Problem: Number of occurrences of X in the List L in prolog I am trying to find the number of occurrences of X in the List L For eg :- occurrences(a, [b, a, b, c, a, d, a], N ). N =3 ...
Number of occurrences of X in the List L in prolog Number of occurrences of X in the List L in prolog prolog Number List occ1 Number of occurrences of X in the List L in prolog I am trying to find the number of occurrences of X in the List L For eg :- My code not working .Here is my code. Can anybody tell me what's wro...
[ 0.004669189453125, 0.008056640625, 0.0133056640625, -0.01153564453125, 0.01513671875, 0.00213623046875, -0.006988525390625, -0.00396728515625, 0.01324462890625, -0.02880859375, -0.006103515625, -0.017822265625, -0.0019073486328125, 0.013671875, 0.0233154296875, 0.00286865234375, 0.04...
[ 103332, 111, 74918, 42, 69098, 1193, 23, 32036, 339, 502, 4867, 95699, 418, 70, 31577, 7413, 14012, 2646, 18151, 959, 20697, 25178, 759, 4171, 37873, 14192, 44691, 5 ]
[ 0.1458740234375, 0.047607421875, 0.1961669921875, 0.16259765625, 0.1187744140625, 0.18408203125, 0.07855224609375, 0.182373046875, 0.1895751953125, 0.1788330078125, 0.2303466796875, 0.150146484375, 0.06439208984375, 0.0179443359375, 0.051666259765625, 0.07611083984375, 0.110595703125...
embed
59646391_c0
59646391
prolog
0
Title: Prolog code in python with Pyswip outputs &quot;None&quot; Problem title: Prolog code in python with Pyswip outputs &quot;None&quot; Tags: prolog, python Problem: Prolog code in python with Pyswip outputs "None" I installed pyswip package and tried following code: from pyswip import Prolog,Query prolog = Prolog(...
Prolog code in python with Pyswip outputs &quot;None&quot; Prolog code in python with Pyswip outputs &quot;None&quot; prolog python pyswip Prolog None Query prolog.assertz prolog.query Prolog code in python with Pyswip outputs "None" I installed pyswip package and tried following code: but it outputs "None". It should ...
[ 0.0230712890625, 0.01171875, 0.0223388671875, 0.031982421875, -0.03125, 0.00494384765625, 0.01104736328125, -0.01470947265625, -0.018798828125, -0.0162353515625, 0.0057373046875, -0.001922607421875, -0.01190185546875, -0.0185546875, -0.002166748046875, 0.0155029296875, 0.021362304687...
[ 1250, 4867, 18151, 17198, 50828, 27512, 7, 2452, 254, 140992, 5021, 86, 23, 502, 57756, 438, 58836, 33657, 169, 944, 20600, 98169, 37842, 25632, 618, 882, 13, 105432, 10752, 3642 ]
[ 0.182861328125, 0.2318115234375, 0.1749267578125, 0.1162109375, 0.174072265625, 0.1712646484375, 0.058624267578125, 0.2237548828125, 0.16796875, 0.1617431640625, 0.080322265625, 0.13818359375, 0.0428466796875, 0.156494140625, 0.1131591796875, 0.0858154296875, 0.1177978515625, 0.098...
embed
33081672_c0
33081672
prolog
0
Title: Sum of numbers in multilevel list - Prolog Problem title: Sum of numbers in multilevel list - Prolog Tags: prolog, recursion, sum Problem: Sum of numbers in multilevel list - Prolog I want to write a predicate in prolog which sums the numbers in all levels of a multilevel list. I get the error: Arithmetic: deepS...
Sum of numbers in multilevel list - Prolog Sum of numbers in multilevel list - Prolog prolog recursion sum Sum Prolog Arithmetic _G5686 _G5697 is_list Sum of numbers in multilevel list - Prolog I want to write a predicate in prolog which sums the numbers in all levels of a multilevel list. I get the error: Arithmetic: ...
[ 0.0198974609375, 0.01202392578125, 0.01068115234375, 0.006011962890625, -0.00634765625, 0.006744384765625, -0.01806640625, 0.0096435546875, 0.026123046875, -0.01348876953125, 0.01141357421875, -0.033447265625, 0.006683349609375, 0.031982421875, 0.03466796875, 0.00927734375, 0.0137329...
[ 36335, 111, 101935, 23, 6024, 67919, 5303, 1250, 4867, 502, 195625, 1830, 10554, 8962, 282, 9523, 724, 758, 178475, 194148, 83, 6562, 3444, 33022, 1653, 2063, 67, 756, 90926, 18499, 53894, 294, 316, 154663, 13683, 116354, 959, 10, 32354, ...
[ 0.218994140625, 0.086181640625, 0.15185546875, 0.05780029296875, 0.110595703125, 0.20751953125, 0.1685791015625, 0.136474609375, 0.205322265625, 0.122314453125, 0.150146484375, 0.007659912109375, 0.209228515625, 0.10101318359375, 0.051025390625, 0.0665283203125, 0.035614013671875, ...
embed
56028793_c0
56028793
prolog
0
Title: How to remove vowels from a given string in Prolog? Problem title: How to remove vowels from a given string in Prolog? Tags: prolog Problem: How to remove vowels from a given string in Prolog? I want to remove vocals from a string in Prolog. I've been looking for all the day for some help but all I could find is...
How to remove vowels from a given string in Prolog? How to remove vowels from a given string in Prolog? prolog a How Prolog How to remove vowels from a given string in Prolog? I want to remove vocals from a string in Prolog. I've been looking for all the day for some help but all I could find is this. which is not work...
[ -0.0027313232421875, 0.008544921875, 0.0155029296875, 0.029296875, -0.0174560546875, 0.002593994140625, -0.00469970703125, -0.00145721435546875, -0.004150390625, 0.004150390625, 0.00860595703125, -0.027587890625, -0.0001544952392578125, -0.00860595703125, 0, 0.003997802734375, 0.0111...
[ 11249, 47, 87388, 2244, 8420, 7, 1295, 34475, 79315, 23, 1250, 4867, 502, 3444, 108171, 4358, 903, 959, 20697, 3034, 38969, 10752, 17997, 19879 ]
[ 0.0919189453125, 0.044403076171875, 0.1861572265625, 0.1949462890625, 0.2264404296875, 0.12646484375, 0.092529296875, 0.07501220703125, 0.2120361328125, 0.08074951171875, 0.148193359375, 0.23095703125, 0.0838623046875, 0.05133056640625, 0.267333984375, 0.058135986328125, 0.0241394042...
embed
9593289_c0
9593289
prolog
0
Title: Prolog - Is this negation by failure correct? Problem title: Prolog - Is this negation by failure correct? Tags: prolog, negation Problem: Prolog - Is this negation by failure correct? Using ! and fail , I'm trying negation by failure. The method below however gives me the warning: Singleton variables: [X]. Howe...
Prolog - Is this negation by failure correct? Prolog - Is this negation by failure correct? prolog negation Prolog big_kahuna_burger Prolog - Is this negation by failure correct? Using ! and fail , I'm trying negation by failure. The method below however gives me the warning: Singleton variables: [X]. However, it seems...
[ -0.0015411376953125, -0.004547119140625, 0.017822265625, 0.0042724609375, -0.0177001953125, 0.01275634765625, 0.0185546875, -0.011474609375, -0.0022125244140625, -0.0252685546875, -0.0274658203125, 0.005096435546875, -0.0036773681640625, 0.0020294189453125, 0.000949859619140625, 0.0093...
[ 1250, 4867, 903, 108, 125682, 390, 137578, 26785, 2071, 502, 6957, 6577, 1946, 109498, 345, 711, 136, 35782, 31577, 55300, 35064, 1631, 592, 43609, 1507, 77336, 1542, 4488, 44691, 159029, 177, 5062, 2082, 16797, 30646, 98320 ]
[ 0.146728515625, 0.2325439453125, 0.10333251953125, 0.164794921875, 0.1710205078125, 0.1295166015625, 0.2568359375, 0.1707763671875, 0.02618408203125, 0.118896484375, 0.1019287109375, 0.09716796875, 0.208740234375, 0.20361328125, 0.022735595703125, 0.1207275390625, 0.0145416259765625,...
embed
65321449_c0
65321449
prolog
0
Title: Lists of list exercsie in Prolog Problem title: Lists of list exercsie in Prolog Tags: prolog, swi-prolog Problem: Lists of list exercsie in Prolog I have this exercise: Write a deterministic Prolog program test( +List, ?Integer ) that succeeds if and only if Integer is the number of ways two different elements ...
Lists of list exercsie in Prolog Lists of list exercsie in Prolog prolog swi-prolog Lists Prolog List Integer Lists of list exercsie in Prolog I have this exercise: But i cannot figure out how i would do this. Hope someone can help
[ 0.00628662109375, 0.01165771484375, -0.00103759765625, 0.0191650390625, -0.004852294921875, 0.0203857421875, -0.0181884765625, -0.000186920166015625, 0.0162353515625, -0.015380859375, 0.006744384765625, -0.01202392578125, -0.00927734375, 0.0223388671875, 0.00830078125, -0.0077819824218...
[ 32036, 5303, 1119, 56, 29731, 13, 23, 1250, 4867, 111, 502, 91, 2452, 3454, 44401, 765, 903, 81979, 53418, 26366, 3642, 17, 2806, 54, 4358 ]
[ 0.1842041015625, 0.215087890625, 0.09429931640625, 0.156982421875, 0.0986328125, 0.068115234375, 0.000980377197265625, 0.1431884765625, 0.2313232421875, 0.017333984375, 0.09686279296875, 0.01519012451171875, 0.1607666015625, 0.12030029296875, 0.1494140625, 0.06976318359375, 0.0895385...
embed
40979912_c1
40979912
prolog
1
3)] ; L = [edge(a, b, 2), edge(b, c, 2), edge(c, d, 2), edge(d, a, 2), edge(a, b, 2), edge(b, c, 2), edge(c, d, 2)] ; L = [edge(a, b, 2), edge(b, c, 2), edge(c, d, 2), edge(d, a, 2), edge(a, b, 2), edge(b, c, 2), edge(c, d, 2)] ; L = [edge(a, b, 2), edge(b, c, 2), edge(c, d, 2), edge(d, a, 2), edge(a, b, 2), edge(b, c,...
3)] ; L = [edge(a, b, 2), edge(b, c, 2), edge(c, d, 2), edge(d, a, 2), edge(a, b, 2), edge(b, c, 2), edge(c, d, 2)] ; L = [edge(a, b, 2), edge(b, c, 2), edge(c, d, 2), edge(d, a, 2), edge(a, b, 2), edge(b, c, 2), edge(c, d, 2)] ; L = [edge(a, b, 2), edge(b, c, 2), edge(c, d, 2), edge(d, a, 2), edge(a, b, 2), edge(b, c,...
[ 0.004730224609375, 0.0245361328125, -0.017333984375, 0.00162506103515625, -0.006011962890625, 0.01275634765625, -0.020263671875, 0.0211181640625, 0.0030670166015625, -0.04638671875, 0.003143310546875, -0.0147705078125, -0.00921630859375, 0.014892578125, 0.0010223388671875, 0.0077819824...
[ 8439, 268, 2819, 339, 2203, 297, 429, 11, 876, 4958, 121303, 275, 501, 4, 238, 104, 71, 10, 132, 16, 5351, 87, 39, 20903, 237, 20949, 9844, 3332, 195, 13566, 104851, 140992, 1284, 135179, 21208, 179933, 23, 40956, 136, 831, 18, 2046, ...
[ 0.212890625, 0.0926513671875, 0.07708740234375, 0.1949462890625, 0.160400390625, 0.1505126953125, 0.141357421875, 0.0208587646484375, 0.09326171875, 0.06298828125, 0.2255859375, 0.042449951171875, 0.04986572265625, 0.01751708984375, 0.03729248046875, 0.108642578125, 0.09710693359375,...
embed
2507691_c0
2507691
prolog
0
Title: How can I insert an additional argument after the last argument in a prolog procedure? Problem title: How can I insert an additional argument after the last argument in a prolog procedure? Tags: prolog, predicate Problem: How can I insert an additional argument after the last argument in a prolog procedure? I am...
How can I insert an additional argument after the last argument in a prolog procedure? How can I insert an additional argument after the last argument in a prolog procedure? prolog predicate How Nic Adam How can I insert an additional argument after the last argument in a prolog procedure? I am new to learning prolog, ...
[ 0.00335693359375, 0.0106201171875, -0.01708984375, 0.0111083984375, -0.0208740234375, 0.03515625, -0.018310546875, -0.0032806396484375, 0.006866455078125, -0.04150390625, 0.0167236328125, -0.03515625, -0.01446533203125, -0.01171875, 0.025146484375, -0.01318359375, 0.026611328125, -...
[ 11249, 831, 183540, 142, 78301, 10750, 7103, 4568, 502, 4867, 50491, 1653, 2063, 38855, 16173, 87, 23, 3525, 52080, 1884, 3444, 33022, 32354, 15190, 34292, 3642, 54, 5303 ]
[ 0.0767822265625, 0.0770263671875, 0.2318115234375, 0.06317138671875, 0.188720703125, 0.265380859375, 0.15283203125, 0.1707763671875, 0.14453125, 0.2191162109375, 0.1802978515625, 0.06414794921875, 0.09326171875, 0.040283203125, 0.10400390625, 0.0252685546875, 0.007904052734375, 0.0...
embed
10347206_c0
10347206
prolog
0
Title: How to return single list of answers (instead of multiple individual answers) in prolog? Problem title: How to return single list of answers (instead of multiple individual answers) in prolog? Tags: prolog, combinations, list Problem: How to return single list of answers (instead of multiple individual answers) ...
How to return single list of answers (instead of multiple individual answers) in prolog? How to return single list of answers (instead of multiple individual answers) in prolog? prolog combinations list How How to return single list of answers (instead of multiple individual answers) in prolog? I have a prolog definiti...
[ 0.01123046875, 0.00017833709716796875, 0.006561279296875, 0.01031494140625, -0.0194091796875, 0.0128173828125, -0.01141357421875, -0.01416015625, 0.006744384765625, -0.045166015625, -0.01165771484375, 0.0033416748046875, 0.009521484375, 0.018310546875, -0.009765625, 0.006072998046875, ...
[ 11249, 30646, 11001, 5303, 111, 35166, 7, 824, 712, 48716, 11651, 23, 502, 4867, 162515, 47, 80934, 1884, 64457, 70541, 756, 7722, 16940 ]
[ 0.05487060546875, 0.220458984375, 0.1878662109375, 0.2064208984375, 0.05340576171875, 0.1942138671875, 0.00262451171875, 0.04705810546875, 0.022186279296875, 0.1414794921875, 0.05224609375, 0.050048828125, 0.1607666015625, 0.248046875, 0.1617431640625, 0.01251220703125, 0.06756591796...
embed
51563655_c0
51563655
prolog
0
Title: Confusion in output of double negation as failure Problem title: Confusion in output of double negation as failure Tags: prolog, negation-as-failure Problem: Confusion in output of double negation as failure I am trying to learn prolog and i came across the following problem: Given - try(X):-not(not((member(X,[a...
Confusion in output of double negation as failure Confusion in output of double negation as failure prolog negation-as-failure Confusion _12010 Confusion in output of double negation as failure I am trying to learn prolog and i came across the following problem: Given - I would expect the query ?- try(X). , for the fol...
[ 0.00921630859375, 0.00958251953125, 0.0167236328125, 0.005615234375, -0.005706787109375, 0.01611328125, 0.0155029296875, -0.00830078125, 0.0067138671875, 0.0072021484375, -0.005096435546875, 0.0106201171875, -0.0000820159912109375, 0.013671875, 0.00421142578125, 0.000675201416015625, ...
[ 1657, 92105, 140992, 41929, 108, 125682, 237, 137578, 23, 111, 502, 4867, 162, 120540, 11436, 30698, 2967, 2806, 41206, 41, 1294, 705, 9, 9790, 1542, 25632, 1884, 15824, 83, 44084, 450, 77336, 959, 173969, 297, 47, 34292 ]
[ 0.009033203125, 0.169677734375, 0.2203369140625, 0.1798095703125, 0.1669921875, 0.1534423828125, 0.097412109375, 0.2152099609375, 0.026580810546875, 0.0148468017578125, 0.1131591796875, 0.1903076171875, 0.0985107421875, 0.13134765625, 0.0462646484375, 0.015716552734375, 0.0322265625,...
embed
76139734_c0
76139734
prolog
0
Title: prolog 4 QUEENS PROBLEM helps giving error not able to find it Problem title: prolog 4 QUEENS PROBLEM helps giving error not able to find it Tags: prolog Problem: prolog 4 QUEENS PROBLEM helps giving error not able to find it perm([X|Y],Z):-perm(Y,W),delete_member(X,Z,W). perm([],[]). delete_member(X,[X|R],R). d...
prolog 4 QUEENS PROBLEM helps giving error not able to find it prolog 4 QUEENS PROBLEM helps giving error not able to find it prolog QUEENS PROBLEM delete_member all_diff X1-Y1 prolog 4 QUEENS PROBLEM helps giving error not able to find it giving error,not able to find it please help
[ 0.004791259765625, 0.0172119140625, 0.020751953125, 0.01214599609375, -0.024658203125, -0.0123291015625, -0.03369140625, -0.0079345703125, 0.01171875, -0.0216064453125, 0.00823974609375, 0.0184326171875, 0.022216796875, -0.005584716796875, -0.017578125, 0.0103759765625, -0.0209960937...
[ 502, 4867, 201, 21389, 42603, 220133, 112397, 68772, 18499, 19048, 7413, 442, 154109, 39, 27417, 756, 152462, 1193, 20268, 1723, 418, 22936, 4358 ]
[ 0.12646484375, 0.1748046875, 0.1806640625, 0.157470703125, 0.17431640625, 0.1507568359375, 0.07415771484375, 0.0657958984375, 0.172119140625, 0.1068115234375, 0.13134765625, 0.048858642578125, 0.1627197265625, 0.0775146484375, 0.2076416015625, 0.1248779296875, 0.209228515625, 0.098...
embed
70632138_c0
70632138
prolog
0
Title: Rewrite the definition in order to avoid the recursive call Problem title: Rewrite the definition in order to avoid the recursive call Tags: prolog Problem: Rewrite the definition in order to avoid the recursive call Given the following PROLOG predicate definition f(integer, integer), with the flow model (i, o):...
Rewrite the definition in order to avoid the recursive call Rewrite the definition in order to avoid the recursive call prolog Rewrite I-1 Rewrite the definition in order to avoid the recursive call Given the following PROLOG predicate definition f(integer, integer), with the flow model (i, o): Rewrite the definition i...
[ -0.031005859375, -0.000835418701171875, -0.004608154296875, 0.0009918212890625, 0.001983642578125, -0.0107421875, -0.00506591796875, 0.0213623046875, 0.0089111328125, 0.000797271728515625, 0.0179443359375, 0.004364013671875, -0.021728515625, -0.00133514404296875, 0.041748046875, 0.0043...
[ 853, 434, 18781, 80934, 12989, 47, 71864, 195625, 5844, 11782, 502, 4867, 87, 5759, 10514, 47510, 1653, 2063, 67, 1238, 132, 6191, 1505, 4, 892, 678, 86608, 3299, 14, 36, 70, 1375, 856, 15044, 70731, 86725, 15265, 64552, 9563, 40383 ]
[ 0.142822265625, 0.177001953125, 0.1904296875, 0.258056640625, 0.059967041015625, 0.005584716796875, 0.199951171875, 0.2034912109375, 0.119873046875, 0.1807861328125, 0.1513671875, 0.2357177734375, 0.103759765625, 0.14990234375, 0.18359375, 0.27001953125, 0.1868896484375, 0.24011230...
embed
44101602_c0
44101602
prolog
0
Title: Prolog - Quotient and reminder. How it&#x27;s work? Problem title: Prolog - Quotient and reminder. How it&#x27;s work? Tags: prolog Problem: Prolog - Quotient and reminder. How it's work? I have to give some examples quotient and reminder in Prolog but for now I don't understand how it's work. quotient(X,Y,Q) is...
Prolog - Quotient and reminder. How it&#x27;s work? Prolog - Quotient and reminder. How it&#x27;s work? prolog Prolog Quotient How Prolog - Quotient and reminder. How it's work? I have to give some examples quotient and reminder in Prolog but for now I don't understand how it's work. quotient(X,Y,Q) is true if X/Y = Q ...
[ 0.019287109375, 0.029296875, 0.0030670166015625, -0.0120849609375, -0.016357421875, 0.00592041015625, 0.0111083984375, -0.0031890869140625, 0.004180908203125, -0.0257568359375, -0.00396728515625, 0.0062255859375, -0.0255126953125, 0.0174560546875, -0.004669189453125, -0.01165771484375,...
[ 1250, 4867, 43851, 118, 2517, 136, 98911, 56, 11249, 442, 3768, 7, 4488, 502, 27781, 41502, 18750, 23, 28219, 3642, 1542, 1723, 2737, 29568, 2174, 1193, 64, 2203, 2396, 8962, 6083, 101935, 47143, 820, 1052, 101637, 390, 990, 8337, 10588, ...
[ 0.2037353515625, 0.27392578125, 0.168701171875, 0.1649169921875, 0.220458984375, 0.1160888671875, 0.2376708984375, 0.2003173828125, 0.1109619140625, 0.07830810546875, 0.06982421875, 0.0440673828125, 0.18310546875, 0.1177978515625, 0.0985107421875, 0.200927734375, 0.244384765625, 0....
embed
15189435_c0
15189435
prolog
0
Title: Change the Return response of Prolog Problem title: Change the Return response of Prolog Tags: xsb, prolog, prolog-toplevel Problem: Change the Return response of Prolog I am a novice at programming in prolog. I want to change the value returned by a prolog program such that it returns true / false instead of th...
Change the Return response of Prolog Change the Return response of Prolog xsb prolog prolog-toplevel Change Prolog Change the Return response of Prolog I am a novice at programming in prolog. I want to change the value returned by a prolog program such that it returns true / false instead of the standard yes or no. Con...
[ -0.0054931640625, 0.006256103515625, 0.0220947265625, 0.01141357421875, 0.00238037109375, 0.0283203125, 0.01470947265625, -0.01531982421875, -0.00885009765625, 0.004852294921875, 0.00653076171875, 0.0146484375, -0.0299072265625, 0.00628662109375, 0.0301513671875, -0.00958251953125, 0...
[ 87377, 70, 173340, 57553, 1250, 4867, 111, 275, 502, 13784, 67919, 95968, 56037, 3444, 47, 15549, 34292, 176377, 1528, 30646, 29568, 248, 98320, 64457, 5570, 72272, 707, 110, 8781, 27781, 5, 683, 75101, 13315, 10644, 83, 5021, 112, 27750, ...
[ 0.1810302734375, 0.0625, 0.26708984375, 0.223876953125, 0.1644287109375, 0.2587890625, 0.05084228515625, 0.0909423828125, 0.12255859375, 0.0277252197265625, 0.1063232421875, 0.044403076171875, 0.016876220703125, 0.05328369140625, 0.04400634765625, 0.170654296875, 0.11474609375, 0.1...
embed
74600974_c0
74600974
prolog
0
Title: Logic with numbers Problem title: Logic with numbers Tags: rust, prolog, clpfd Problem: Logic with numbers In SWI-Prolog, I can write that :- use_module(library(clpfd)). and(A,B):- A , B. And I get: ?- and((X #= 4), (X #> 3)). X = 4. ?- and((X #= 4), (X #< 3)). false. ?- and((X #< 4), (X #> 3)). false. ?- and((X...
Logic with numbers Logic with numbers rust prolog clpfd Logic use_module inf..2 Logic with numbers In SWI-Prolog, I can write that And I get: Is it possible to write that in Rust using std::cmp ? For now, I'll settle for the answer true, false, without instantiating the X variable. Thank you for any tip.
[ -0.000568389892578125, 0.0062255859375, 0.005584716796875, 0.007232666015625, 0.000766754150390625, 0.0145263671875, 0.00640869140625, 0.00148773193359375, 0.01495361328125, -0.0213623046875, -0.004058837890625, 0.004425048828125, 0.01416015625, 0.01953125, 0.027099609375, -0.000101566...
[ 50592, 238, 678, 101935, 52648, 502, 4867, 39557, 71, 4527, 83279, 34128, 304, 159, 38969, 10752, 831, 33022, 450, 2046, 442, 7722, 47, 23, 144222, 17368, 6138, 2676, 9615, 133, 35166, 29568, 98320, 15490, 34648, 1193, 77336, 6069 ]
[ 0.203857421875, 0.084228515625, 0.165283203125, 0.213623046875, 0.213623046875, 0.109619140625, 0.2393798828125, 0.01007080078125, 0.16455078125, 0.083251953125, 0.1181640625, 0.06414794921875, 0.012176513671875, 0.06475830078125, 0.2333984375, 0.1722412109375, 0.07867431640625, 0....
embed
41474106_c0
41474106
prolog
0
Title: Finding second min value in list Problem title: Finding second min value in list Tags: prolog Problem: Finding second min value in list I have defined the predicate that finds the minimum value in list e.g greater(X,Y):- X > Y. isLower(X,Y):- X < Y. findmin( [X] , X ). findmin( [H|T] , P ):- findmin(T,P1) , isLo...
Finding second min value in list Finding second min value in list prolog Finding Finding second min value in list I have defined the predicate that finds the minimum value in list e.g However i have hard time modifying this code to find second minimum value including nested lists. How could i assure that the second min...
[ -0.001953125, -0.01177978515625, 0.0277099609375, 0.006744384765625, 0.003143310546875, 0.033203125, 0.00518798828125, -0.002471923828125, 0.01953125, -0.0106201171875, 0.0194091796875, -0.0003185272216796875, 0.0084228515625, -0.0220947265625, 0.0152587890625, 0.0172119140625, 0.020...
[ 26040, 17932, 881, 34292, 5303, 214, 23, 502, 4867, 61924, 1653, 2063, 67, 7413, 15440, 7941, 1733, 2811, 151138, 18151, 8512, 71, 92784, 176377 ]
[ 0.07647705078125, 0.1767578125, 0.213134765625, 0.148681640625, 0.1748046875, 0.0027217864990234375, 0.018341064453125, 0.09515380859375, 0.1259765625, 0.071044921875, 0.0799560546875, 0.1131591796875, 0.0208587646484375, 0.07513427734375, 0.21337890625, 0.0157623291015625, 0.0023765...
embed
12695710_c0
12695710
prolog
0
Title: GNU prolog how to get list of list into single list Problem title: GNU prolog how to get list of list into single list Tags: prolog, list Problem: GNU prolog how to get list of list into single list So I am having a list of lists [[],[1],[2,3]] and I want to merge this into a single list. This is was I tried so ...
GNU prolog how to get list of list into single list GNU prolog how to get list of list into single list prolog list GNU Varlist Vars Var1 Var2 GNU prolog how to get list of list into single list So I am having a list of lists [[],[1],[2,3]] and I want to merge this into a single list. This is was I tried so far I GNU P...
[ 0.01470947265625, 0.0157470703125, 0.0101318359375, -0.0014801025390625, -0.00811767578125, 0.016845703125, -0.0135498046875, 0.00390625, 0.01080322265625, -0.043701171875, 0.01806640625, -0.01031494140625, -0.0181884765625, 0.00482177734375, 0.0081787109375, -0.01263427734375, 0.026...
[ 165132, 502, 4867, 3642, 47, 2046, 5303, 111, 3934, 11001, 3323, 6562, 418, 304, 19441, 25256, 155761, 3444, 42564, 903, 37842, 2060, 1250, 35782, 14012, 106, 1810, 31577, 21974, 5036, 75359, 4358 ]
[ 0.1671142578125, 0.1573486328125, 0.21142578125, 0.036102294921875, 0.049591064453125, 0.102783203125, 0.2200927734375, 0.125, 0.156982421875, 0.179931640625, 0.1519775390625, 0.23193359375, 0.056304931640625, 0.0941162109375, 0.0151824951171875, 0.061309814453125, 0.125732421875, ...
embed
32479335_c0
32479335
prolog
0
Title: Solving set partition in Prolog Problem title: Solving set partition in Prolog Tags: prolog Problem: Solving set partition in Prolog I am trying to solve set partition problem in prolog. Suppose, set S = {1,3,4,2,5}. Now to partition it such that L U R = S && L^R = empty I want to Implement a predicate partition...
Solving set partition in Prolog Solving set partition in Prolog prolog Solving Prolog Solving set partition in Prolog I am trying to solve set partition problem in prolog. Suppose, set S = {1,3,4,2,5}. Now to partition it such that I want to Implement a predicate partition/3 such that ?- partition(S,L,R) succeeds iff L...
[ -0.014892578125, 0.0172119140625, 0.02978515625, -0.0091552734375, -0.01385498046875, -0.004913330078125, -0.0211181640625, -0.005767822265625, 0.0002269744873046875, 0.007659912109375, 0.00057220458984375, 0.0224609375, -0.0045166015625, -0.0074462890625, 0.007080078125, 0.01708984375...
[ 6678, 6496, 5423, 2878, 1363, 23, 1250, 4867, 502, 31577, 86869, 2967, 121691, 159, 2203, 82449, 71928, 6044, 3444, 153941, 1653, 2063, 18113, 705, 294, 866, 1052, 214493, 32920, 339, 136, 627, 35604, 133063, 96386, 35166, 1614, 13480, 9017...
[ 0.1280517578125, 0.05133056640625, 0.248779296875, 0.2255859375, 0.1158447265625, 0.042083740234375, 0.17236328125, 0.2457275390625, 0.139892578125, 0.035797119140625, 0.114501953125, 0.1138916015625, 0.00128173828125, 0.09417724609375, 0.0526123046875, 0.121826171875, 0.147094726562...
embed
42514094_c0
42514094
prolog
0
Title: Graph construction in Prolog Problem title: Graph construction in Prolog Tags: prolog Problem: Graph construction in Prolog i am trying to implemente an access control system in prolog, and in some point of my code i have these two rules : canRead(S,O):- readPermissionsRole(R,O),holds(S,R). canWrite(S,O):-writeP...
Graph construction in Prolog Graph construction in Prolog prolog Graph Prolog Graph construction in Prolog i am trying to implemente an access control system in prolog, and in some point of my code i have these two rules : what i need to do is to have as result a graph representing the results of the two rules ; we hav...
[ 0.02734375, 0.0233154296875, -0.00372314453125, 0.019775390625, -0.006591796875, 0.00946044921875, -0.03076171875, 0.006134033203125, -0.0174560546875, -0.033203125, 0.015625, -0.005706787109375, -0.0166015625, 0.0155029296875, 0.01348876953125, 0.0145263671875, -0.0034637451171875, ...
[ 6524, 11727, 50961, 23, 1250, 4867, 502, 31577, 29479, 17203, 6226, 5426, 18151, 6626, 91736, 3871, 54, 765, 16750, 41382, 33636, 50339, 121303, 1295, 180, 47, 159, 2174, 831, 31345, 294, 670, 136, 142, 1456, 18781, 3642, 16940 ]
[ 0.2105712890625, 0.1817626953125, 0.203857421875, 0.037506103515625, 0.1512451171875, 0.2481689453125, 0.114501953125, 0.019775390625, 0.0638427734375, 0.1348876953125, 0.16943359375, 0.06866455078125, 0.057708740234375, 0.09185791015625, 0.171142578125, 0.054656982421875, 0.01242065...
embed
67336171_c0
67336171
prolog
0
Title: Resolution solver in prolog Problem title: Resolution solver in prolog Tags: prolog Problem: Resolution solver in prolog I am trying to build a resolution solver in prolog. What I want to do is given a list named 'Clause' and a list of lists named 'Rest', to find if for an element X in 'Clause' there exists an e...
Resolution solver in prolog Resolution solver in prolog prolog Resolution Clause Rest Resolution solver in prolog I am trying to build a resolution solver in prolog. What I want to do is given a list named 'Clause' and a list of lists named 'Rest', to find if for an element X in 'Clause' there exists an element neg X i...
[ -0.0167236328125, 0.0126953125, 0.01263427734375, 0.012451171875, -0.0164794921875, 0.005279541015625, 0.01361083984375, 0.00787353515625, 0.01202392578125, 0.00151824951171875, -0.0250244140625, 0.0167236328125, -0.0186767578125, -0.01025390625, 0.004302978515625, 0.01031494140625, ...
[ 853, 166589, 3115, 814, 23, 502, 4867, 100700, 13, 49756, 31577, 45367, 158839, 3444, 34475, 5303, 26253, 1052, 525, 7413, 2174, 12830, 1193, 32316, 108, 177, 7225, 87388, 1295, 136, 107730, 2046, 450 ]
[ 0.067138671875, 0.20849609375, 0.1495361328125, 0.157470703125, 0.052032470703125, 0.133056640625, 0.2274169921875, 0.1485595703125, 0.0931396484375, 0.1959228515625, 0.009490966796875, 0.06744384765625, 0.1875, 0.053985595703125, 0.02301025390625, 0.081787109375, 0.1123046875, 0.1...
embed
57576919_c0
57576919
prolog
0
Title: getting control error when using not fact(something) in prolog Problem title: getting control error when using not fact(something) in prolog Tags: prolog Problem: getting control error when using not fact(something) in prolog I have this fact: test(something). When I write: test(X). the answer is: X = something,...
getting control error when using not fact(something) in prolog getting control error when using not fact(something) in prolog prolog not getting control error when using not fact(something) in prolog I have this fact: When I write: the answer is: X = something, but when I write: I get: 'Error 21 : Control Error ! Goal ...
[ 0.0233154296875, 0.0026092529296875, 0.007049560546875, -0.0047607421875, 0.00238037109375, 0.00579833984375, 0.005859375, -0.01055908203125, 0.0101318359375, -0.01068115234375, -0.018310546875, -0.012939453125, -0.0225830078125, -0.00116729736328125, 0.024169921875, 0.00433349609375, ...
[ 20949, 6226, 18499, 17368, 959, 15824, 43452, 64113, 502, 4867, 23, 33022, 35166, 1193, 2203, 9844, 2046, 18468, 31611, 952, 27131, 212059, 711, 2016, 289, 31157, 157, 29479, 390, 35978, 6954, 1542, 1250 ]
[ 0.026611328125, 0.23193359375, 0.1871337890625, 0.06005859375, 0.2191162109375, 0.185791015625, 0.0179901123046875, 0.09002685546875, 0.1221923828125, 0.225830078125, 0.0076904296875, 0.1077880859375, 0.1273193359375, 0.07171630859375, 0.072265625, 0.123779296875, 0.000457763671875, ...
embed
9301381_c0
9301381
prolog
0
Title: Testing if all lists in a list have the same length Problem title: Testing if all lists in a list have the same length Tags: prolog, list Problem: Testing if all lists in a list have the same length I am trying to learn more about lists in Prolog, especially lists within a list. So I want to write a predicate to...
Testing if all lists in a list have the same length Testing if all lists in a list have the same length prolog list Testing Testing if all lists in a list have the same length I am trying to learn more about lists in Prolog, especially lists within a list. So I want to write a predicate to determine if the lists in a l...
[ 0.018310546875, 0.01708984375, -0.005157470703125, 0.0216064453125, -0.016845703125, -0.00775146484375, 0.01275634765625, -0.00604248046875, 0.005279541015625, -0.00506591796875, 0.006103515625, 0.0002994537353515625, 0.018310546875, 0.0252685546875, 0.00174713134765625, 0.002899169921...
[ 8647, 214, 2174, 756, 5303, 7, 23, 765, 5701, 140909, 502, 4867, 1250, 28032, 3444, 33022, 1653, 2063, 83324, 10, 105950, 31577, 12765, 12638, 1957, 237, 96362 ]
[ 0.1712646484375, 0.039581298828125, 0.0799560546875, 0.113525390625, 0.2027587890625, 0.01239013671875, 0.052764892578125, 0.0298614501953125, 0.1451416015625, 0.171630859375, 0.093994140625, 0.1578369140625, 0.0931396484375, 0.055267333984375, 0.003997802734375, 0.0533447265625, 0.0...
embed
44360424_c0
44360424
prolog
0
Title: Prolog - remove the non unique elements Problem title: Prolog - remove the non unique elements Tags: prolog Problem: Prolog - remove the non unique elements I have a predicate to check if the element is member of list and looks the following: member(X,[X|_]). member(X,[_|T]) :- member(X,T). When I called: ?- mem...
Prolog - remove the non unique elements Prolog - remove the non unique elements prolog Prolog Prolog - remove the non unique elements I have a predicate to check if the element is member of list and looks the following: When I called: ?- member(1,[2,3,1,4]) I get: true. And now I have to use it to write predicate which...
[ -0.006103515625, 0.0194091796875, 0.02685546875, -0.00921630859375, -0.026123046875, 0.0194091796875, 0.0059814453125, 0.00958251953125, -0.0034942626953125, -0.0289306640625, 0.0024566650390625, 0.0064697265625, 0.0228271484375, -0.00531005859375, -0.005218505859375, 0.004547119140625...
[ 1250, 4867, 87388, 351, 36998, 80854, 70, 502, 1653, 2063, 67, 12765, 2174, 12830, 83, 32786, 111, 5303, 33342, 25632, 35839, 705, 9, 155761, 163324, 29568, 5, 4527, 33022, 756, 1295, 54, 450 ]
[ 0.17236328125, 0.255615234375, 0.17529296875, 0.15869140625, 0.19482421875, 0.2135009765625, 0.0204925537109375, 0.1116943359375, 0.1514892578125, 0.1865234375, 0.1158447265625, 0.1627197265625, 0.055206298828125, 0.18505859375, 0.03961181640625, 0.2435302734375, 0.0251007080078125, ...
embed
36917528_c0
36917528
prolog
0
Title: Findall/3 for a sublist meeting certain criteria Problem title: Findall/3 for a sublist meeting certain criteria Tags: prolog, list Problem: Findall/3 for a sublist meeting certain criteria I have two lists L1 and L2 : L1=[1,4,5,6,7,8]. L2=[2,3]. And a predicate: related(X,Y). I want to find a list L3 : which is...
Findall/3 for a sublist meeting certain criteria Findall/3 for a sublist meeting certain criteria prolog list Findall Findall/3 for a sublist meeting certain criteria I have two lists L1 and L2 : And a predicate: I want to find a list L3 : which is a sublist of L1 in which all the elements of L3 are solutions for Y , w...
[ 0.01165771484375, -0.019775390625, 0.00872802734375, -0.00140380859375, -0.0206298828125, 0.00579833984375, 0.00106048583984375, 0.004730224609375, 0.023193359375, -0.0059814453125, 0.016357421875, -0.00921630859375, -0.00121307373046875, -0.008544921875, 0.00396728515625, 0.0173339843...
[ 26040, 5584, 18113, 100, 1614, 6562, 41714, 24233, 55738, 502, 4867, 5303, 6626, 339, 418, 304, 1653, 2063, 3444, 7413, 363, 756, 80854, 621, 51347, 990, 111, 142424, 8035, 1193, 61590, 3934, 1810, 186, 42518 ]
[ 0.1614990234375, 0.2088623046875, 0.2783203125, 0.055419921875, 0.2264404296875, 0.220947265625, 0.109130859375, 0.078857421875, 0.127197265625, 0.1182861328125, 0.166748046875, 0.197998046875, 0.03125, 0.10400390625, 0.0562744140625, 0.1114501953125, 0.033599853515625, 0.048553466...
embed
19469678_c0
19469678
prolog
0
Title: Prolog removing IF THEN ELSE Problem title: Prolog removing IF THEN ELSE Tags: recursion, prolog, conditional-statements Problem: Prolog removing IF THEN ELSE I would like to reformat my code without the if then else condition. Is there an easy way to do this? This is just an exemple of code. I think using IF-TH...
Prolog removing IF THEN ELSE Prolog removing IF THEN ELSE recursion prolog conditional-statements Prolog THEN Param1 Param2 Prolog removing IF THEN ELSE I would like to reformat my code without the if then else condition. Is there an easy way to do this? This is just an exemple of code. I think using IF-THEN-ELSE in pr...
[ 0.002838134765625, 0.0201416015625, -0.003753662109375, 0.0162353515625, -0.00457763671875, 0.0169677734375, -0.003814697265625, 0.0130615234375, 0.0034942626953125, -0.03076171875, 0.01953125, -0.019775390625, -0.02734375, -0.0030517578125, 0.03076171875, -0.005828857421875, 0.02160...
[ 1250, 4867, 49146, 6496, 55449, 23373, 839, 96922, 195625, 1830, 502, 35431, 289, 61340, 1720, 39, 418, 304, 2806, 1884, 23491, 18, 18151, 15490, 2174, 7068, 37076, 23468, 18632, 5351, 17368, 96432, 23, 83, 179459, 16487, 1286, 5844, 50218,...
[ 0.1756591796875, 0.259765625, 0.1436767578125, 0.044281005859375, 0.2174072265625, 0.0914306640625, 0.085693359375, 0.212646484375, 0.1510009765625, 0.0211944580078125, 0.156005859375, 0.1964111328125, 0.0882568359375, 0.0994873046875, 0.07928466796875, 0.05126953125, 0.0065307617187...
embed
50417278_c2
50417278
prolog
2
yet -- I had to dig around elsewhere to get that, which led into completely valid questions of "well, what kind of 'not equal' did you want?", which I am currently unprepared to answer. But I digress... It is inconceivable to me that this is the way this actually gets done in real code. Combinatorially, it's ridiculou...
yet -- I had to dig around elsewhere to get that, which led into completely valid questions of "well, what kind of 'not equal' did you want?", which I am currently unprepared to answer. But I digress... It is inconceivable to me that this is the way this actually gets done in real code. Combinatorially, it's ridiculou...
[ -0.005218505859375, -0.0146484375, 0.0015106201171875, 0.0189208984375, 0.0042724609375, -0.0037841796875, -0.0081787109375, -0.021240234375, 0.01531982421875, 0.025634765625, -0.0113525390625, -0.00160980224609375, 0.034912109375, 0.01318359375, -0.039794921875, -0.007568359375, -0....
[ 14373, 1466, 2046, 64557, 35604, 17582, 19256, 2367, 8562, 111, 10869, 105950, 6777, 398, 3444, 82424, 2500, 19623, 23, 2271, 329, 3984, 2661, 903, 83, 3917, 20653, 62163, 16940, 2773, 18151, 106935, 76, 77275, 442, 236873, 37202, 54567, 16...
[ 0.108154296875, 0.011474609375, 0.001861572265625, 0.00701904296875, 0.0601806640625, 0.0214080810546875, 0.007904052734375, 0.0243988037109375, 0.126708984375, 0.0634765625, 0.189453125, 0.250732421875, 0.090087890625, 0.0379638671875, 0.1746826171875, 0.002838134765625, 0.002929687...
embed
68109366_c0
68109366
prolog
0
Title: Swi-Prolog: How to write a descendant predicate? Problem title: Swi-Prolog: How to write a descendant predicate? Tags: prolog Problem: Swi-Prolog: How to write a descendant predicate? I have the provided definition of descendent as below: " a person who is in direct line to an ancestor. Eg: child, grandchild, gr...
Swi-Prolog: How to write a descendant predicate? Swi-Prolog: How to write a descendant predicate? prolog Swi-Prolog How Swi-Prolog: How to write a descendant predicate? I have the provided definition of descendent as below: " a person who is in direct line to an ancestor. Eg: child, grandchild, great-grandchild, and fo...
[ 0.0159912109375, 0.00897216796875, 0.00640869140625, 0.00885009765625, -0.01251220703125, 0.0164794921875, -0.00445556640625, 0.003570556640625, 0.000843048095703125, -0.0498046875, 0.00830078125, -0.0167236328125, -0.010498046875, -0.00128936767578125, 0.00640869140625, 0.006530761718...
[ 105432, 9, 10752, 4867, 11249, 47, 33022, 10, 60887, 1236, 1653, 2063, 67, 502, 12, 62952, 80934, 111, 2517, 35064, 3445, 2750, 83, 23, 8951, 13315, 60502, 1290, 22221, 29041, 4, 9963, 206, 38472, 6782, 79139, 136993, 91736, 831, 42856, ...
[ 0.1806640625, 0.0295867919921875, 0.111572265625, 0.185302734375, 0.1182861328125, 0.1082763671875, 0.2325439453125, 0.05706787109375, 0.279296875, 0.2098388671875, 0.1973876953125, 0.2347412109375, 0.164794921875, 0.09228515625, 0.00860595703125, 0.047454833984375, 0.2081298828125, ...
embed
40855381_c0
40855381
prolog
0
Title: assigning a value to anonymous variable in prolog Problem title: assigning a value to anonymous variable in prolog Tags: prolog Problem: assigning a value to anonymous variable in prolog I want to mary two person. I defined X and Y in top of grammar. My grammar is: evlendir(X,Y):- I write following code but I ca...
assigning a value to anonymous variable in prolog assigning a value to anonymous variable in prolog prolog assigning a value to anonymous variable in prolog I want to mary two person. I defined X and Y in top of grammar. My grammar is: evlendir(X,Y):- I write following code but I can not compare D and B with 1998. D is...
[ 0.01373291015625, -0.00506591796875, 0.014404296875, 0.00994873046875, -0.00982666015625, 0.014404296875, -0.0026702880859375, 0.016845703125, 0.000690460205078125, -0.001129150390625, 0.005096435546875, 0.008056640625, 0.01611328125, -0.0189208984375, -0.00567626953125, 0.000934600830...
[ 95486, 214, 34292, 47, 52184, 10821, 77336, 502, 4867, 3444, 1108, 53, 6626, 3445, 61924, 1193, 136, 990, 2663, 122092, 147, 3404, 39079, 1542, 1723, 25632, 18151, 831, 959, 69101, 391, 335, 82490, 15005, 127319, 17489, 11280, 117776, 63399...
[ 0.21044921875, 0.034515380859375, 0.2005615234375, 0.079833984375, 0.2003173828125, 0.112548828125, 0.225830078125, 0.15869140625, 0.24169921875, 0.07220458984375, 0.1300048828125, 0.1448974609375, 0.1201171875, 0.10760498046875, 0.1502685546875, 0.076171875, 0.085693359375, 0.1113...
embed
12175884_c0
12175884
prolog
0
Title: Find out height of a binary tree Problem title: Find out height of a binary tree Tags: binary-tree, prolog Problem: Find out height of a binary tree I would like to know how to get the total height of a binary tree. This is how far I came before I started to error loop in my head. height( leaf(_), 1 ). height( b...
Find out height of a binary tree Find out height of a binary tree binary-tree prolog Find Branch1 Branch2 Find out height of a binary tree I would like to know how to get the total height of a binary tree. This is how far I came before I started to error loop in my head. I think I'm on the right track but I can't seem ...
[ 0.0167236328125, 0.0123291015625, -0.001953125, -0.00142669677734375, 0.00836181640625, 0.018798828125, -0.00970458984375, -0.007354736328125, 0.000293731689453125, -0.049072265625, -0.00787353515625, -0.0267333984375, -0.01312255859375, 0.01043701171875, 0.02783203125, 0.0071105957031...
[ 26040, 1810, 155955, 111, 2394, 6635, 53201, 62600, 502, 4867, 21110, 206, 418, 304, 2806, 1884, 3714, 3642, 47, 2046, 70, 3622, 2060, 21449, 8108, 18499, 40956, 10336, 5351, 7108, 28560, 831, 48903, 137565, 10932, 4568, 2831, 77336, 98816,...
[ 0.0958251953125, 0.0968017578125, 0.227783203125, 0.048553466796875, 0.1708984375, 0.1505126953125, 0.2271728515625, 0.2039794921875, 0.061126708984375, 0.1080322265625, 0.06243896484375, 0.01025390625, 0.003173828125, 0.04473876953125, 0.0254058837890625, 0.06524658203125, 0.0515136...
embed
33972402_c1
33972402
prolog
1
,1980),job(unemployed))]). family(person(name(daniel),surname(sturgess),date(19,november,1956),job(unemployed)), person(name(susan),surname(sturgess),date(18,october,1957),job(manager,15400)), children[person(name(mick),surname(sturgess),date(5,december,1982),job(unemployed))]). And what I'm trying to do is figure out ...
,1980),job(unemployed))]). family(person(name(daniel),surname(sturgess),date(19,november,1956),job(unemployed)), person(name(susan),surname(sturgess),date(18,october,1957),job(manager,15400)), children[person(name(mick),surname(sturgess),date(5,december,1982),job(unemployed))]). And what I'm trying to do is figure out ...
[ 0.0277099609375, 0.006134033203125, -0.00830078125, 0.0213623046875, -0.01397705078125, 0.0234375, -0.0155029296875, 0.004364013671875, 0.00131988525390625, -0.033935546875, -0.012451171875, 0.000331878662109375, -0.0079345703125, -0.0023040771484375, -0.005767822265625, -0.00003647804...
[ 97057, 36791, 309, 212423, 14449, 30816, 11627, 36108, 141, 7102, 22854, 4188, 17489, 120114, 6516, 27417, 189638, 3445, 7, 38504, 44150, 205403, 141395, 1837, 10700, 20020, 266, 50718, 159027, 31577, 26366, 3917, 28282, 1653, 2063, 67, 58386, ...
[ 0.212890625, 0.145263671875, 0.0675048828125, 0.2200927734375, 0.1651611328125, 0.06097412109375, 0.038055419921875, 0.100341796875, 0.0948486328125, 0.064453125, 0.1197509765625, 0.1641845703125, 0.0673828125, 0.073486328125, 0.089599609375, 0.0081787109375, 0.1885986328125, 0.038...
embed
63061137_c0
63061137
prolog
0
Title: I want to know if there is any way I can store a predicate dynamically in prolog and then call it Problem title: I want to know if there is any way I can store a predicate dynamically in prolog and then call it Tags: prolog, dynamically-generated, predicate Problem: I want to know if there is any way I can store...
I want to know if there is any way I can store a predicate dynamically in prolog and then call it I want to know if there is any way I can store a predicate dynamically in prolog and then call it prolog dynamically-generated predicate store_in_db I want to know if there is any way I can store a predicate dynamically in...
[ 0.0230712890625, -0.005889892578125, 0.00921630859375, 0.007720947265625, 0.00469970703125, 0.03955078125, -0.00016880035400390625, -0.0015106201171875, 0.00823974609375, -0.0859375, -0.0036773681640625, -0.001861572265625, 0.00022029876708984375, -0.0301513671875, 0.00982666015625, 0....
[ 3444, 3714, 2499, 3917, 831, 4343, 1653, 2063, 67, 84079, 25958, 23, 502, 4867, 11782, 442, 48281, 73, 48073, 959, 32562, 31344, 18151, 3293, 5117, 17932, 28412 ]
[ 0.02862548828125, 0.034271240234375, 0.009918212890625, 0.0477294921875, 0.0343017578125, 0.2080078125, 0.19189453125, 0.243408203125, 0.13916015625, 0.212646484375, 0.1221923828125, 0.06378173828125, 0.170166015625, 0.2462158203125, 0.1898193359375, 0.056976318359375, 0.118530273437...
embed
74906974_c0
74906974
prolog
0
Title: Prolog finding target number in a list by applying operations (+,-,/,*) Problem title: Prolog finding target number in a list by applying operations (+,-,/,*) Tags: prolog Problem: Prolog finding target number in a list by applying operations (+,-,/,*) The task is to find if there exists at least one combination...
Prolog finding target number in a list by applying operations (+,-,/,*) Prolog finding target number in a list by applying operations (+,-,/,*) prolog Prolog Prolog finding target number in a list by applying operations (+,-,/,*) The task is to find if there exists at least one combination of numbers from given list an...
[ -0.004730224609375, 0.021484375, 0.023681640625, 0.004058837890625, 0.0081787109375, 0.0135498046875, -0.00933837890625, 0.007171630859375, 0.003631591796875, -0.0257568359375, 0.005340576171875, -0.027099609375, 0.004486083984375, 0.01513671875, 0.00439453125, -0.01416015625, -0.009...
[ 1250, 4867, 90791, 30388, 14012, 23, 5303, 390, 59911, 41018, 7, 22183, 9, 64, 77518, 502, 66211, 83, 47, 7413, 2174, 2685, 32316, 99, 19713, 1632, 162515, 111, 101935, 1295, 34475, 39933, 113054, 438, 4527, 83279, 107003, 82449, 133063, ...
[ 0.189208984375, 0.251953125, 0.1270751953125, 0.300537109375, 0.2164306640625, 0.06634521484375, 0.213623046875, 0.0248565673828125, 0.1282958984375, 0.1890869140625, 0.009307861328125, 0.1802978515625, 0.1168212890625, 0.0782470703125, 0.019683837890625, 0.127197265625, 0.2021484375...
embed
52425558_c0
52425558
prolog
0
Title: Prolog - determine amount of duplicates in list and turn the amount into an exponent Problem title: Prolog - determine amount of duplicates in list and turn the amount into an exponent Tags: duplicates, exponent, list, prolog Problem: Prolog - determine amount of duplicates in list and turn the amount into an ex...
Prolog - determine amount of duplicates in list and turn the amount into an exponent Prolog - determine amount of duplicates in list and turn the amount into an exponent duplicates exponent list prolog Prolog Prolog - determine amount of duplicates in list and turn the amount into an exponent I want to calculate the am...
[ 0.007537841796875, 0.015625, -0.00156402587890625, -0.007110595703125, -0.01092529296875, 0.02099609375, 0.032470703125, -0.003570556640625, 0.01470947265625, -0.0125732421875, -0.0203857421875, 0.0191650390625, 0.007080078125, 0.00469970703125, -0.0026702880859375, 0.00885009765625, ...
[ 1250, 4867, 83324, 41170, 111, 171763, 1636, 23, 5303, 136, 15504, 3934, 142, 1119, 54137, 20, 502, 87, 3444, 47, 74481, 154109, 2856, 28412, 237, 3775, 693, 52721, 47143, 5701, 5, 27781 ]
[ 0.1669921875, 0.25, 0.16357421875, 0.15234375, 0.03594970703125, 0.275390625, 0.1717529296875, 0.0821533203125, 0.176513671875, 0.1370849609375, 0.0955810546875, 0.07720947265625, 0.05279541015625, 0.120361328125, 0.2296142578125, 0.0270538330078125, 0.102783203125, 0.0065002441406...
embed
5706180_c0
5706180
prolog
0
Title: Basic Library System in Prolog Problem title: Basic Library System in Prolog Tags: visual-prolog, prolog Problem: Basic Library System in Prolog I want to make a basic library management system in prolog. The program should answer queries like which book is issued by which student and which date book will be ret...
Basic Library System in Prolog Basic Library System in Prolog visual-prolog prolog Basic Library System Prolog Basic Library System in Prolog I want to make a basic library management system in prolog. The program should answer queries like which book is issued by which student and which date book will be returned. I w...
[ 0.01324462890625, 0.0174560546875, -0.00176239013671875, 0.0284423828125, -0.0186767578125, 0.0194091796875, -0.0198974609375, 0.0091552734375, -0.00946044921875, -0.047119140625, 0.00848388671875, -0.001373291015625, -0.01611328125, 0.0172119140625, -0.006591796875, -0.01312255859375,...
[ 91692, 103835, 12353, 23, 1250, 4867, 21176, 3454, 502, 3444, 3249, 62822, 35773, 1294, 24365, 5426, 1528, 5608, 35166, 41, 12877, 31089, 9836, 5622, 1221, 176377, 196219, 24763, 82761, 3871, 30698, 100, 442, 4552, 3525, 6165, 85493, 25545, ...
[ 0.15380859375, 0.21923828125, 0.1646728515625, 0.08203125, 0.1617431640625, 0.231689453125, 0.1759033203125, 0.0899658203125, 0.1395263671875, 0.092041015625, 0.06756591796875, 0.15576171875, 0.188232421875, 0.1407470703125, 0.171142578125, 0.1605224609375, 0.1302490234375, 0.02989...
embed