Блог пользователя __RS__

Автор __RS__, история, 2 года назад, По-английски

How can I generate hash function for matrix ? or how can we compare if two submatrix are equal or not ?

EDIT : tagging source problem , just to make sure it's not from an ongoing contest | interview.

  • Проголосовать: нравится
  • +5
  • Проголосовать: не нравится

»
2 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by __RS__ (previous revision, new revision, compare).

»
2 года назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

Hash of element $$$a_{i,j}$$$ is equal to $$$a_{i,j}u^iv^j$$$, where $$$u,v$$$ are some random numbers. The hash of a submatrix is equal to the sum of hashes of its elements. You can do row/column translations by simply multiplying by powers of $$$u,v$$$.