I'm trying to match a subset of the facts I'm creating, and my testcase was working great!
x([1,2,3,4],'bleah').
x([1,2,4],'bleah2').
x([1,2],'bleah8').
x([1,3,4],'bleah3').
x([5,6,7,8],'bleah5').
x([6,7,8,9],'bleah6').
fuzzy(X,R) :- x(Z, R), subset(X,Z) .
remaining(X,Y,D,M) :- x(Z,D) , select(X,Z,N), select(Y,N,M).
pair(X,Y,R) :- x([X,Y],R) ; x([Y,X],R).
Output:
?- x([1,2|REST],D).
REST = [3, 4],
D = bleah ;
REST = [4],
D = bleah2 ;
REST = [],
D = bleah8 ;
false.
?- pair(2,1,D).
D = bleah8 ;
false.
?- fuzzy([2,1],R).
R = bleah ;
R = bleah2 ;
R = bleah8 ;
false.
?- remaining(2,1,D,M).
D = bleah,
M = [3, 4] ;
D = bleah2,
M = [4] ;
D = bleah8,
M = [] ;
false.
Then I added a fact to represent my next potential case, and now it's quite broken. I'm new to Prolog, I'm not sure why this is or how to fix it.
x([6,X,8,9],'woot') :- (X+0) > 7.
Output:
?- x([1,2|REST],D).
REST = [3, 4],
D = bleah ;
REST = [4],
D = bleah2 ;
REST = [],
D = bleah8 ;
false.
?- pair(2,1,D).
D = bleah8 ;
false.
?- fuzzy([2,1],R).
R = bleah ;
R = bleah2 ;
R = bleah8 ;
ERROR: >/2: Arguments are not sufficiently instantiated
^ Exception: (9) _G260+0>7 ? abort
% Execution Aborted
?- remaining(2,1,D,M).
D = bleah,
M = [3, 4] ;
D = bleah2,
M = [4] ;
D = bleah8,
M = [] ;
ERROR: >/2: Arguments are not sufficiently instantiated
^ Exception: (10) _G270+0>7 ? abort
% Execution Aborted
?- x([_,15,_,_],D).
D = woot.
Suggestions welcome.
Can X only be a natural number? If yes, then you can change your rule
x([6,X,8,9], 'woot') :- (X+0) > 7.
to
x([6, X, 8, 9], 'woot') :- between(8, inf, X).
This works at least in SWI-Prolog:
?- x(A, B).
A = [6, 8, 8, 9],
B = woot ;
A = [6, 9, 8, 9],
B = woot ;
A = [6, 10, 8, 9],
B = woot ;
...
In fuzzy/2 and remaining/4, you are calling x/2 with an uninstantiated Z. This means that the Left Hand Side of + (and therefore >) is uninstantiated.
Ok, changing to a finite datatype helped!
% Basic comparisons
same(X,Y) :- X == Y.
greaterThan(X,Y) :- lessThan(Y,X).
lessThan(X,Y) :- is_lessThan(X,Y).
lessThan(X,Y) :- is_lessThan(X,Z) , lessThan(Z,Y).
% Enumerate a list
is_lessThan( 'a', 'b' ).
is_lessThan( 'b', 'c' ).
is_lessThan( 'c', 'd' ).
is_lessThan( 'd', 'e' ).
is_lessThan( 'e', 'f' ).
is_lessThan( 'f', 'g' ).
is_lessThan( 'g', 'h' ).
is_lessThan( 'h', 'i' ).
% "Static" facts of variable length
x(['a','b','c','d'],'abcd').
x(['a','b','d'],'abd').
x(['a','b'],'ab').
x(['a','c','d'],'acd').
x(['e','f','g','h'],'efgh').
x(['f','g','h','i'],'fghi').
% "Dynamic" facts of variable length and constraint
x(['f',X,'h','i'],'fXhi') :- greaterThan('g',X).
x(['f',X,Y],'fXY') :- greaterThan('g',X), lessThan(Y,'i').
% specify the two list items separately in X & Y
fuzzyMatch(X,Y,R) :- x([X,Y],R) ; x([Y,X],R) .
% specify the list X
fuzzyMatch(X,R) :- x(Z, R), subset(X,Z) .
% specify two list items separately, returning the remaining terms that didn't match
fuzzyMatch(X,Y,D,M) :- x(Z,D) , select(X,Z,N), select(Y,N,M).
Output:
?- fuzzyMatch('b','a',D).
D = ab ;
false.
?- fuzzyMatch(['b','a'],D).
D = abcd ;
D = abd ;
D = ab ;
D = fXY ;
D = fXY ;
false.
?- fuzzyMatch('b','a',R,D).
R = abcd,
D = [c, d] ;
R = abd,
D = [d] ;
R = ab,
D = [] ;
R = fXY,
D = [f] ;
R = fXY,
D = [f] ;
false.
Related
I need to implement this function:
cod_first(X, L, Lrem, Lfront).
Lfront contains all the copies of X that are at the beginning of L, including X; Lrem is the list of the rest of the elements.
I've tried to implement it using append but I'm quite new in Prolog and I'm a bit lost.
The expected output for the program is something like this:
?- cod_first(1, [1, 1, 2, 3], Lrem, Lfront)
Lrem = [2, 3],
Lfront = [1, 1, 1];
false.
?- cod_first(1, [2, 3, 4], Lrem, Lfront)
Lrem = [2, 3, 4],
Lfront = [1];
false.
Update: I've found this function that packs the same elements into a list:
pack([], []).
pack([X], [[X]]).
pack([X, X| L], [[X| Xs]| R]) :-
pack([X| L], [Xs| R]).
pack([X, Y| L], [[X]| R]) :-
X \= Y,
pack([Y| L], R).
I think this function could be adaptable to the one I'm looking for, any help?
First let's check the code you found! I will test it by considering all lists, starting with the shortest one:
?- N=N, length(Xs,N), pack(Xs, Xss).
N = 0, Xs = [], Xss = []
; N = 1, Xs = [_A], Xss = [[_A]]
; N = 2, Xs = [_A,_A], Xss = [[_A,_A]]
; N = 3, Xs = [_A,_A,_A], Xss = [[_A,_A,_A]]
; N = 4, Xs = [_A,_A,_A,_A], Xss = [[_A,_A,_A,_A]]
; ... .
So, according to this query, your code only works for lists where all elements are the same. In fact, the goal X \= Y is responsible for this. Better express inequality with dif(X, Y). With this little change we get:
?- N=N, length(Xs,N), pack(Xs, Xss).
N = 0, Xs = [], Xss = []
; N = 1, Xs = [_A], Xss = [[_A]]
; N = 2, Xs = [_A,_A], Xss = [[_A,_A]]
; N = 2, Xs = [_A,_B], Xss = [[_A],[_B]], dif(_A,_B)
; N = 3, Xs = [_A,_A,_A], Xss = [[_A,_A,_A]]
; N = 3, Xs = [_A,_A,_B], Xss = [[_A,_A],[_B]], dif(_A,_B)
; N = 3, Xs = [_A,_B,_B], Xss = [[_A],[_B,_B]], dif(_A,_B)
; N = 3, Xs = [_A,_B,_C], Xss = [[_A],[_B],[_C]], dif(_A,_B), dif(_B,_C)
; N = 4, Xs = [_A,_A,_A,_A], Xss = [[_A,_A,_A,_A]]
; ... .
Now we get really all solutions. Let's consider the two answers for N = 2. The first says that for Xs's elements being all equal, Xss contains just one element. The second says that when Xs's elements are different, they show in separate elements of Xss. Note the dif(_A,_B) which ensures that only terms that are different are chosen.
However, you are only interested in a single such split:
cod_first(X, [], [], [X]).
cod_first(X, [X|Es], Lrem, [X|Xs]) :-
cod_first(X, Es, Lrem, Xs).
cod_first(X, [E|Es], [E|Es], [X]) :-
dif(X,E).
?- N=N, length(Xs, N), cod_first(X, Xs, Lrem, Lfront).
N = 0, Xs = [], Lrem = [], Lfront = [X]
; N = 1, Xs = [X], Lrem = [], Lfront = [X,X]
; N = 1, Xs = [_A], Lrem = [_A], Lfront = [X], dif(_A,X)
; N = 2, Xs = [X,X], Lrem = [], Lfront = [X,X,X]
; N = 2, Xs = [X,_A], Lrem = [_A], Lfront = [X,X], dif(_A,X)
; N = 2, Xs = [_A,_B], Lrem = [_A,_B], Lfront = [X], dif(_A,X)
; N = 3, Xs = [X,X,X], Lrem = [], Lfront = [X,X,X,X]
; N = 3, Xs = [X,X,_A], Lrem = [_A], Lfront = [X,X,X], dif(_A,X)
; N = 3, Xs = [X,_A,_B], Lrem = [_A,_B], Lfront = [X,X], dif(_A,X)
; N = 3, Xs = [_A,_B,_C], Lrem = [_A,_B,_C], Lfront = [X], dif(_A,X)
; N = 4, Xs = [X,X,X,X], Lrem = [], Lfront = [X,X,X,X,X]
; ... .
Here is another version which I prefer using library(reif) available
for
SICStus and
SWI.
cod_first2(X, Es, Lrem, [X|Xs]) :-
cod_first2i(Es, X, Xs, Lrem).
cod_first2i([], _, [], []).
cod_first2i([E|Es], X, Xs0, Ys) :-
if_( E = X
, ( Xs0 = [X|Xs], cod_first2i(Es, X, Xs, Ys) )
, ( Xs0 = [], Ys = [E|Es] )
).
This is much more efficient, but gives exactly the same answers.
so I wrote a predicate that counts how many times an element occurs in a list of lists.
count([], _, 0). #base case
count([[Elem|Rest]|OtherLists], Elem, Count) :- #Elem is the head of sublist
!,
count([Rest|OtherLists], Elem, NewCount),
succ(NewCount, Count).
count([[_|Rest]|OtherLists], Elem, Count) :- #Elem is not the head of sublist
count([Rest|OtherLists], Elem, Count).
count([[]|OtherLists], Elem, Count) :- #Head sublist is an empty list
count(OtherLists, Elem, Count).
Now that if I query the predicate with the following:
count([[1,2,3],[4,1,5],[4,6,1]], 1, X).
it returns X = 3, which is correct, but it will also say 'false' if I continue with the query.
So it counts elements correctly, but I cannot use this predicate inside other predicates since it eventually returns FALSE.
What am I doing wrong?
When Prolog encounters a "choice point" (a place in the code where it can come back to seek more possible solutions) in the process of finding a solution, it will show the solution and prompt you for more possible solutions. If it finds no more, it displays "false". This is not any kind of error in your logic. It's the way Prolog works.
It is not always desirable to remove the choice point. It depends upon what your goals are for the predicate. The danger in removing choice points using cuts is that the choice point may be a path to valid alternative solutions, and the cut prevents your program from finding those solutions.
Let's try your updated program with the new proposed cut in your answer:
| ?- count([[1,2,3],[4,1,5],[4,6,1]], 1, X).
X = 3
yes
| ?- count([[1,2,1,3],[4,1,5],[4,6,1]], 1, X).
X = 4
yes
| ?- count([[1,2,1,3],[4,1,5],[4,6,1],[1]], 1, X).
X = 5
So far, so good. These look like complete and correct answers. I believe your additional cut (and including your original cut) will yield a correct answer as long as the first argument is fully bound with no variables. Let's try a more interesting query:
2 ?- count([[A,2,B],[C,1,D]], 1, X).
A = B, B = C, C = D, D = 1,
X = 5.
3 ?-
The predicate found one solution. However, aren't there more? What about this one?
A = _ % something other than 1
B = C, C = D, D = 1,
X = 4.
This would be a correct solution as well, but the predicate fails to find it.
Also, what about this query?
2 ?- count([[1,2,1,3],[4,1,5],[4,6,1],[1]], E, X).
E = 1,
X = 5.
3 ?-
Again, only one solution found. But aren't there more? What about E = 4 and X = 2?
If we remove all of the cuts from the original predicate in an attempt to get all of the correct solutions, then we get incorrect solutions as well:
2 ?- count([[1,2],[3,1,4],[1]], 1,X).
X = 3 ;
X = 2 ;
X = 2 ;
X = 1 ;
X = 2 ;
X = 1 ;
X = 1 ;
X = 0 ;
false.
2 ?- count([[1,2,1,3],[4,1,5],[4,6,1],[1]], E, X).
E = 1,
X = 5 ;
E = 1,
X = 4 ;
E = 1,
X = 3 ;
...
So if more generality is desired, a more effective solution needs to be constructed.
count_occurrences_lol([], _, 0).
count_occurrences_lol([List|Lists], X, Count) :-
count_occurrences(List, X, C1), % Count occurrences in this list
count_occurrences_lol(Lists, X, C2), % Count occurrences in remaining sublists
Count is C1 + C2. % Total the counts
count_occurrences([], _, 0).
count_occurrences([X|Xs], X, Count) :-
count_occurrences(Xs, X, C1),
Count is C1 + 1.
count_occurrences([X1|Xs], X, Count) :-
dif(X1, X),
count_occurrences(Xs, X, Count).
Now we get the following:
3 ?- count_occurrences_lol([[1,2],[3,1,4],[1]], 1,X).
X = 3 ;
false.
Just one solution, as expected. And the following:
5 ?- count_occurrences_lol([[A,2,B],[C,1,3]], 1, X).
A = B, B = C, C = 1,
X = 4 ;
A = B, B = 1,
X = 3,
dif(C, 1) ;
A = C, C = 1,
X = 3,
dif(B, 1) ;
A = 1,
X = 2,
dif(B, 1),
dif(C, 1) ;
B = C, C = 1,
X = 3,
dif(A, 1) ;
B = 1,
X = 2,
dif(A, 1),
dif(C, 1) ;
C = 1,
X = 2,
dif(A, 1),
dif(B, 1) ;
X = 1,
dif(A, 1),
dif(B, 1),
dif(C, 1) ;
false.
3 ?- count_occurrences_lol([[1,2,1,3],[4,1,5],[4,6,1],[1]], E, X).
E = 1,
X = 5 ;
E = 2,
X = 1 ;
E = 3,
X = 1 ;
E = 4,
X = 2 ;
E = 5,
X = 1 ;
E = 6,
X = 1 ;
X = 0,
dif(E, 1),
dif(E, 1),
dif(E, 6),
dif(E, 4),
dif(E, 5),
dif(E, 1),
dif(E, 4),
dif(E, 3),
dif(E, 1),
dif(E, 2),
dif(E, 1).
4 ?-
Several possible solutions as expected.
Ok, it looks like it was backtracking on the part where 'Elem is not the head of sublist', and I was able to fix it by changing it to:
count([[_|Rest]|OtherLists], Elem, Count) :- #Elem is not the head of sublist
!,
count([Rest|OtherLists], Elem, Count).
If anyone can confirm whether this is a correct solution. Thanks
I have written the following program to compute all pairs of members in a list. Here is my code:
select_pair(X, Y, [X|[Y|T]], T).
select_pair(X, Y, [Head|[X|[Y|T]]], [Head|Rest]) :- select_pair(X, Y, T, Rest).
I am supposed to call my code with this 3-member list only:
select pair(X, Y, [1,2,3], Zs).
But this doesn't generate all possible combinations. It only generates
X = 1, Y = 2, Zs = [3]
and it is supposed to generate this, but it does not:
X = 1, Y = 2, Zs = [3] ;
X = 1, Y = 3, Zs = [2] ;
X = 2, Y = 1, Zs = [3] ;
X = 2, Y = 3, Zs = [1] ;
X = 3, Y = 1, Zs = [2] ;
X = 3, Y = 2, Zs = [3]
So, how can I modify this code to generate all possible pairs of members of the list [1, 2, 3]?
I'd use procedure select/3:
select_pair(X, Y, List, Rest):-
select(X, List, MList),
select(Y, MList, Rest).
The first select would remove the first element from List into X and put the rest of the list in MList.
Then the second select would get you the second element and the Rest.
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 design a predicate with the form comb([1,2,3], L). which should return the following answer for L:
[1]
[2]
[3]
[1,2]
[2,1]
[1,3]
[3,1]
[2,3]
[3,2]
[1,2,3]
[1,3,2]
[2,1,3]
[2,3,1]
[3,1,2]
[3,2,1]
What you are asking for involves both combinations (selecting a subset) and permutations (rearranging the order) of a list.
Your example output implies that the empty list is not considered a valid solution, so we will exclude it in the implementation that follows. Reconsider if this was an oversight. Also this implementation produces the solutions in a different order than your example output.
comb(InList,Out) :-
splitSet(InList,_,SubList),
SubList = [_|_], /* disallow empty list */
permute(SubList,Out).
splitSet([ ],[ ],[ ]).
splitSet([H|T],[H|L],R) :-
splitSet(T,L,R).
splitSet([H|T],L,[H|R]) :-
splitSet(T,L,R).
permute([ ],[ ]) :- !.
permute(L,[X|R]) :-
omit(X,L,M),
permute(M,R).
omit(H,[H|T],T).
omit(X,[H|L],[H|R]) :-
omit(X,L,R).
Tested with Amzi! Prolog:
?- comb([1,2,3],L).
L = [3] ;
L = [2] ;
L = [2, 3] ;
L = [3, 2] ;
L = [1] ;
L = [1, 3] ;
L = [3, 1] ;
L = [1, 2] ;
L = [2, 1] ;
L = [1, 2, 3] ;
L = [1, 3, 2] ;
L = [2, 1, 3] ;
L = [2, 3, 1] ;
L = [3, 1, 2] ;
L = [3, 2, 1] ;
no
Stay pure by defining comb/2 based on same_length/2, prefix/2, foldl/4 and
select/3:
comb(As,Bs) :-
same_length(As,Full),
Bs = [_|_],
prefix(Bs,Full),
foldl(select,Bs,As,_).
Here's the sample query given by the OP:
?- comb([1,2,3],Xs).
Xs = [1]
; Xs = [2]
; Xs = [3]
; Xs = [1,2]
; Xs = [1,3]
; Xs = [2,1]
; Xs = [2,3]
; Xs = [3,1]
; Xs = [3,2]
; Xs = [1,2,3]
; Xs = [1,3,2]
; Xs = [2,1,3]
; Xs = [2,3,1]
; Xs = [3,1,2]
; Xs = [3,2,1]
; false.
Ok! But what if the list given as the first argument contains duplicates?
?- comb([1,1,2],Xs).
Xs = [1]
; Xs = [1] % (redundant)
; Xs = [2]
; Xs = [1,1]
; Xs = [1,2]
; Xs = [1,1] % (redundant)
; Xs = [1,2] % (redundant)
; Xs = [2,1]
; Xs = [2,1] % (redundant)
; Xs = [1,1,2]
; Xs = [1,2,1]
; Xs = [1,1,2] % (redundant)
; Xs = [1,2,1] % (redundant)
; Xs = [2,1,1]
; Xs = [2,1,1] % (redundant)
; false.
Not quite! Can we get rid of above redundant answers? Yes, simply use selectd/3!
comb(As,Bs) :-
same_length(As,Full),
Bs = [_|_],
prefix(Bs,Full),
foldl(selectd,Bs,As,_).
So let's re-run above query again with the improved implementation of comb/2!
?- comb([1,1,2],Xs).
Xs = [1]
; Xs = [2]
; Xs = [1,1]
; Xs = [1,2]
; Xs = [2,1]
; Xs = [1,1,2]
; Xs = [1,2,1]
; Xs = [2,1,1]
; false.
there is a predefined predicate called permutation ...
1 ?- permutation([1,2,3],L).
L = [1, 2, 3] ;
L = [2, 1, 3] ;
L = [2, 3, 1] ;
L = [1, 3, 2] ;
L = [3, 1, 2] ;
L = [3, 2, 1] .
2 ?- listing(permutation).
lists:permutation([], [], []).
lists:permutation([C|A], D, [_|B]) :-
permutation(A, E, B),
select(C, D, E).
lists:permutation(A, B) :-
permutation(A, B, B).
true.
hope this helps ..
Hint: This is easy to do if you have written a predicate inselt(X,Y,Z), which holds if any insertion of Y into X gives Z:
inselt([E|X], Y, [E|Z]) :- inselt(X,Y,Z).
inselt(X, Y, [Y|X]).
Then comb/3 can be coded recursively using inselt/3.
:- use_module(library(clpfd)). % load constraint library
% [constraint] Compute a list of distinct odd numbers (if one exists), such that their sum is equal to a given number.
odd(Num) :- Num mod 2 #= 1.
sumOfList([],N,N) :- !.
sumOfList([H|T],Counter,N) :-
NewN #= H + Counter,
sumOfList(T,NewN,N).
buildOddList(N,InputList,L) :-
%return list when sum of list is N
V in 1..N,
odd(V),
append(InputList,[V],TempL),
sumOfList(TempL,0,N)->
L = TempL;
buildOddList(N,TempL,L).
computeOddList(N) :-
buildOddList(N,[],L),
label(L).
This is my code, I can't seem to get the right output, any code critics? :)
Here my take on this question, realized by a predicate nonNegInt_oddPosSummands/2 and an auxiliary predicate list_n_sum/3:
:- use_module(library(clpfd)).
list_n_sum([],_,0).
list_n_sum([Z|Zs],N,Sum) :-
Z #>= 1,
Z #=< N,
Z mod 2 #= 1,
Sum #= Z + Sum0,
Sum0 #>= 0,
list_n_sum(Zs,N,Sum0).
nonNegInt_oddPosSummands(N,List) :-
length(_,N),
list_n_sum(List,N,N),
chain(List,#<),
labeling([],List).
Now on to some queries!
First, "which lists can 19 be decomposed into?":
?- nonNegInt_oddPosSummands(19,Zs).
Zs = [19] ;
Zs = [1, 3, 15] ;
Zs = [1, 5, 13] ;
Zs = [1, 7, 11] ;
Zs = [3, 5, 11] ;
Zs = [3, 7, 9] ;
false.
Next, a more general query that does not terminate as the solution set is infinite. "Which positive integers N can be decomposed into Zs if Zs has a length of 2?"
?- Zs=[_,_], nonNegInt_oddPosSummands(N,Zs).
N = 4, Zs = [1,3] ;
N = 6, Zs = [1,5] ;
N = 8, Zs = [1,7] ;
N = 8, Zs = [3,5] ;
N = 10, Zs = [1,9] ...
Finally, the most general query. Like the one above it does not terminate, as the solution set is infinite. However, it fairly enumerates all decompositions and corresponding positive integers.
?- nonNegInt_oddPosSummands(N,Zs).
N = 0, Zs = [] ;
N = 1, Zs = [1] ;
N = 3, Zs = [3] ;
N = 4, Zs = [1,3] ;
N = 5, Zs = [5] ;
N = 6, Zs = [1,5] ;
N = 7, Zs = [7] ;
N = 8, Zs = [1,7] ;
N = 8, Zs = [3,5] ;
N = 9, Zs = [9] ;
N = 9, Zs = [1,3,5] ;
N = 10, Zs = [1,9] ...
Can suggest you this solution:
:- use_module(library(clpfd)).
all_odd([]) :-!.
all_odd([H | T]) :-
H mod 2 #= 1,
all_odd(T).
solve(N,L) :-
N2 is floor(sqrt(N)),
Len in 1..N2,
label([Len]),
length(L, Len),
L ins 1..N,
all_different(L),
all_odd(L),
sum(L,#=,N),
label(L),
% only show sorted sets
sort(L,L).
Example:
?- solve(17,L).
L = [17] ;
L = [1, 3, 13] ;
L = [1, 5, 11] ;
L = [1, 7, 9] ;
L = [3, 5, 9] ;
false.
I see others have posted complete solutions already. Still, your code can be made to wok with only two slight modifications:
computeOddList only tests whether such a list exists. To know which list matches the constraints, just return it. Thus:
computeOddList(N, L) :-
...
The list TempL may currently contain duplicates. Just place all_different(TempL) after append to fix that.
Now computeOddList will return at least one list of distinct odd numbers if it exists. Still, for e.g. computeOddList(17, L) it will not return all lists. I don't know clpFD myself, so other than suggesting you compare your code to Xonix' code I cannot really help you.
:- use_module(library(clpfd)). % load constraint library
% [constraint] Compute a list of distinct odd numbers (if one exists), such that their sum is equal to a given number.
odd(Num) :- Num mod 2 #= 1.
sumOfList([],N,N) :- !.
sumOfList([H|T],Counter,N) :-
NewN #= H + Counter,
sumOfList(T,NewN,N).
oddList([]) :- !.
oddList([H|T]) :-
odd(H),
oddList(T).
computeOddList(N,L) :-
(L = [];L=[_|_]),
length(L,V),
V in 1..N,
L ins 1..N,
all_different(L),
oddList(L),
sumOfList(L,0,N).
I managed to kinda solved it, however it doesn't end properly after it runs out of cases. Hmm.