recursive-backtracking Questions
2
Solved
I'm trying to understand the semicolon functionality.
I have this code:
del(X,[X|Rest],Rest).
del(X,[Y|Tail],[Y|Rest]) :-
del(X,Tail,Rest).
permutation([],[]).
permutation(L,[X|P]) :- del(X,L,L...
Hexateuch asked 14/4, 2020 at 18:50
1
I am trying to implement a depth first iterative deepening search of a state space graph.
I have a graph with three vertices and their are two activating edges and two inhibition edges. Each node h...
Orbadiah asked 5/11, 2014 at 9:10
4
I want to write a function in Racket which takes an amount of money and a list of specific bill-values, and then returns a list with the amount of bills used of every type to make the given amount ...
Gangway asked 29/4, 2018 at 12:7
2
Solved
I'm trying to understand backtracking but I'm stuck in this problem, here's the prompt:
Given a set of distinct integers, return all possible subsets.
Example input: [1,2,3]
Example output: [[],...
Undergarment asked 14/8, 2017 at 19:3
2
Solved
I need to solve a crossword given the initial grid and the words (words can be used more than once or not at all).
The initial grid looks like that:
++_+++
+____+
___+__
+_++_+
+____+
++_+++
He...
Marcela asked 21/6, 2017 at 21:11
3
Solved
the reason why I am creating this new thread instead of just reading the answers to this particular question that have been given before is that I feel I just don't fully understand the whole idea ...
Indiscrimination asked 7/2, 2016 at 14:58
1
Solved
Example: sudoku solving with backtracking
How do you backtrack without recursion - using loops? I only found solutions when you call backtrack() itself.
Gunfight asked 25/1, 2014 at 17:21
1
© 2022 - 2024 — McMap. All rights reserved.