Computer Science Asked by user3862410 on November 21, 2021
Suppose, we want to rearrange all possible $n$-bit binary strings (i.e., we have $2^{n}-1$ possible strings) in a 1-D array $X$; given that stings with smaller hamming distance should be placed as much closely as possible. Is there any algorithm to find the best solution efficiently?
Note: I belive, for this problem, we need to maximize $sum_limits{i=0}^{2^{n}-2}sumlimits_{j=i+1}^{2^{n}-1}bigg(d(X[i],X[j]) times |i-j|bigg)$. Here, $d(X[i],X[j])$ is the hamming distance between $i$th and $j$th element of the array $X$.
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP