public static int hg_step3(int step, int[][] mask, int[] colCover)
	{
		//What STEP 3 does:
		//Step 3 works on the mask matrix only. It examines each column and if
		//the column has a starred zero, then it covers it. If k columns are
		//covered, where k is min(rowsOfInputtedArray, colsOfInputtedArray),then
		//we got a complete set of unique assignments and we are done. It means
		//we have found and starred k independent zeros. However we can set
		//k = rowsOfInputtedArray because we have transposed the matrix already
		//so that the rows are less than the columns.
		//If k columns are not covered, then we go to Step 4.
		
		printStepHeader("Step 3", 1);
		System.out.println( "Step 3 covers columns of starred zeros.\n" +
							"If " + mask.length + " columns are covered we are done.\n" +
							"(" + mask.length + " because rows of cost matrix are " + mask.length + ".)\n" +
							"If not, we need to proceed to step 4.\n");
					
		print2DArrayInt(mask, "%d\t", "Mask matrix passed to step 3:", 1);
		
		//Cover columns containing starred zeros
	    for (int i=0; i<mask.length; i++)
	    {
	        for (int j=0; j<mask[i].length; j++)
	        {
	            if (mask[i][j] == 1)
	            {
	                colCover[j]=1;
				}
	        }
	    }
	    
		//This block used only to print what columns are covered in increasing sequence
		for (int j=0; j<colCover.length; j++)
		{
			if (colCover[j] == 1)
			{
				System.out.println("Column " + (j+1) + " had a starred zero and was covered.");
			}
		}
		
		print1DArrayInt(colCover, "%d   ", "\nThe Col cover matrix after step 3 becomes:", 2);
		
		//Count number of covered columns
		int count=0;
		for (int j=0; j<colCover.length; j++)
	    {
	        count=count+colCover[j];
	    }
	    //Branch execution to end or to Step 4
		if (count>=mask.length)	//Should be cost.length but ok, because mask has same dimensions.
		{
	        step=7;
	        System.out.println("There are " + count + " covered columns,\n" +
	        					"equal to the required " +mask.length + 
	        					".\nThe problem has been solved.\n");
	    }
	    else
	    {
	        step=4;
	        if (count == 1)
			{
				System.out.println("There is " + count + " covered column,\n"+
									"less than the required " + mask.length + 
									".\nWe need to go to step 4.\n");
			}
	        else
			{
				System.out.println("There are " + count + " covered columns,\n"+
									"less than the required " + mask.length + 
									".\nWe need to go to step 4.\n");
			}
			System.out.println ("Step 3 completed. Going to step " + step + ".\n\n");
		}
	    
		return step;
	}