This problem asks:

Given: A positive integer N≤100000, a number x between 0 and 1, and a DNA string s of length at most 10 bp.

Return: The probability that if N random DNA strings having the same length as s are constructed with GC-content x, then at least one of the strings equals s.

Required reading

None

Restate the problem

I get an integer N, a float x and a short DNA string, s. I need to calculate the probability that the exact sequence s will be generated within N random strings with gc-content x.

Solution steps

This is a lot like prob, so I started with that code and adjusted to the requirements of this challenge.

What took the longest time was that the attempt dataset came with a trailing line break which I needed to strip out.