Question: Given

```
A={{0,1,1,0},{1,0,0,-1},{-1,0,0,1},{0,1,1,0}}

```

and

```
B={{0,1,0,0},{0,0,0,0},{0,0,0,1},{0,0,0,0}}

```

and

`A=C.B.C`, how to find `C`?

Answer: 
```
a = {{0, 1, 1, 0}, {1, 0, 0, -1}, {-1, 0, 0, 1}, {0, 1, 1, 0}};
b = {{0, 1, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 0, 0}};
c = Array[x, {4, 4}];
sol1 = FindInstance[a == c . b . c, Flatten[c], Reals, 1];
c /. sol1[[1]]
a == c . b . c /. sol1[[1]]

```

> 
> `{{0, 99/5, -1, 12/5}, {1, 0, 0, -1}, {-1, -(28/5), 0, 79/ 5}, {0, -1, -1, 0}}`
> 
> 
> 

> 
> `True`
> 
> 
>
Brute force?

```
A={{0,1,1,0},{1,0,0,-1},{-1,0,0,1},{0,1,1,0}};
B={{0,1,0,0},{0,0,0,0},{0,0,0,1},{0,0,0,0}};
cC={{a,b,c,d},{e,f,g,h},{i,j,k,l},{m,n,o,p}};
cC/.Solve[A==cC.B.cC,{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p}]

```

which returns a caution that this may not be all solutions, but gives seven solutions.

```
{{{(1-e^2)/g,b,-e,d},{e,g,g,-e},{-e,j,-g,l},{(1-e^2)/g,-e,-e,(-1+e^2)/g}},
 {{m,b,1,d},{-1,0,0,1},{1,j,0,l},{m,1,1,-m}},
 {{m,b,-1,d},{1,0,0,-1},{-1,j,0,l},{m,-1,-1,-m}},
 {{0,b,-1,d},{-1,0,0,1},{1,j,0,l},{0,-1,-1,0}},
 {{0,b,1,d},{-1,0,0,1},{1,j,0,l},{0,1,1,0}},
 {{0,b,-1,d},{1,0,0,-1},{-1,j,0,l},{0,-1,-1,0}},
 {{0,b,1,d},{1,0,0,-1},{-1,j,0,l},{0,1,1,0}}}

```