Solving a discrete logarithm problem returns a 0x1 sym or Unable to find explicit solution
Show older comments
syms x
solve(2 == (6^x) - (11 * ((6^x)/11)),x)
Returns:
ans =
Empty sym: 0-by-1
I tried using:
syms x
solve(2==mod((6^x),11),x)
but i recieve:
Warning: Unable to find explicit solution. For options, see help.
> In solve (line 317)
ans =
Empty sym: 0-by-1
I just want to solve:
2 Comments
Alberto Giardino
on 9 Jan 2022
Torsten
on 9 Jan 2022
Did you find an example that MATLAB's "solve" is able to solve congruences ?
Answers (1)
Brute force:
x = 0:24;
y = uint64(6.^x);
d = mod(y,11);
x = x(d==2)
Categories
Find more on Symbolic Math Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!