Skip to content

Find a k-Universal Circular String #191

Closed
@hamidgasmi

Description

@hamidgasmi

Find a k-universal circular binary string.

Input: An integer k.

Output: A k-universal circular string. (If multiple answers exist, you may return any one.)

A circular string is a string that does not have an initial or terminal element; instead, the two ends of the string are joined together, and the string can be viewed as a necklace of symbols. For example, the circular string below is AGTTAGCA=GTTAGCAA=TTAGCAAG=...

E.g

A k-universal circular string is a circular string that contains a single occurrence of every possible k-mer over a given alphabet. Over the binary alphabet {0,1}, a k-universal circular string is a circular string that contains every possible binary k-mer. For example, for k = 2, the possible 2-mers are 00, 01, 10, and 11, so 0011 is a 2-universal circular string for the alphaber {0,1}. .

Input Format. An integer k.

Output Format. A k-universal circular string for the binary alphabet.

Constraints. |k| ≤ 10

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions