anchor.diff:  
           let addToP nts (matrix: double [,]) (where: SubMatrix.T) =
               for i in [0 .. where.Size - 1] do
  -//                let rightBound = min m2 (stringSize + 1)
  -                for j in [0 .. where.Size - 1] do
  +                let actualColCount = (min (snd where.Top) (stringSize + 1)) - snd where.Left
  +                for j in [0 .. actualColCount - 1] do
                       addProbToMatrix pMatrix (i + fst where.Left) (j + snd where.Left) (nts, matrix.[i, j])
   
           let subMatrixMult nt1 nt2 (from1: SubMatrix.T) (from2: SubMatrix.T) =
               let calcCell i j =
                   [0..from1.Size-1] |> List.fold (fun acc k -> acc + tMatrix.[nt1].[i + fst from1.Left, k + snd from1.Left] * 
                                                                      tMatrix.[nt2].[k + fst from2.Left, j + snd from2.Left]) 0. 
  -//            let bUpperBound = min bm2 (stringSize + 1)
  -            Array2D.init from1.Size from2.Size calcCell    
  +            let actualCol2Count = (min (snd from2.Top) (stringSize + 1)) - snd from2.Left
  +            Array2D.init from1.Size actualCol2Count calcCell    
   
           let performMultiplication task = 
               let {where=where; from1=from1; from2=from2} = task
  
positive.code:             then
                  let nonTermsForChars = strToParse |> List.ofSeq |> List.map allRules.GetSimpleRule
                  nonTermsForChars |> List.iteri (fun i p -> updateTMatrixCell i (i + 1) p)
              else
                  let matricesCount = (1 <<< (matrixSizeExponent - layerNum + 1)) - 1
                  let firstInLayer = SubMatrix.create (0, 1 <<< layerNum) matricesSize
                  let layer = Array.init matricesCount (fun i -> firstInLayer.RelativeMatrix (i * matricesSize) (i * matricesSize))
                  completeVLayer layer matricesSize
  
  
          for i in 1..matrixSizeExponent do
  
negative.code:             assert (isAnswerValid toCheck (String.length str) searchLen)
              printMatrix toCheck (String.length str) searchLen
              
          check "aabb"
          check "abb"    
          check "aaabbcc"
          check "baaabbcc"
          check "aaaabbcc"
  
          System.Console.ReadLine() |> ignore
          0