Coder Social home page Coder Social logo

findsymmetricpoems's Introduction

Find Symmetric Poems

I got inspirations from https://github.com/LingDong-/magic-square-poems .

"Observe the above 5x5 matrix of Chinese characters: when read horizontally, it consists of five lines from five different poems, and so does it when read vertically, of the exact same lines. "

I prefer symmetric matrix but not magic matrix, because I think it's a symmetric matrix. Observe that when a matrix is symmetric, as in these cases, the matrix is equal to its transpose.

To solve this problem, I implemented a quicker parallel alogorithm. It only takes 36 seconds to find the symmetric poems.

Run

go run main.go

Output

❯ go run main.go               
风月清江夜
月出夜山深
清夜方归来
江山归谢客
夜深来客稀

心如七十人
如何十年间
七十未成事
十年成底事
人间事事慵

[[风月清江夜 月出夜山深 清夜方归来 江山归谢客 夜深来客稀] [心如七十人 如何十年间 七十未成事 十年成底事 人间事事慵]]

~/go/src/FindSymmetricPoems 36s

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.