Another condition for bipartite graphs Let $G$ be a graph. Then prove $G$ is bipartite if and only if for all subgraphs $H$ of $G$ with no isolated vertices. $\alpha(H)=\beta'(H)$. 
Here $\alpha(H)$ is the size of the largest independent set. $\beta'$ is the number of edges in a minimal edge covering of $H$. 
So far what I've done is incorrect because it results in every graph is bipartite. Maybe someone can tell me where I'm wrong and what I should be doing instead. 
$\Rightarrow$ Let $H$ be any subgraph of $G$ with no isolated vertices. Since $H$ has no isolated vertices an edge covering exists. Let $X\subset V(H)$ be an independent set such that $|X|=\alpha$. Define $Y=V(H)\backslash X$. Then all the edges of $X$ go to $Y$. Every vertex in $Y$ must be connected to an edge in $X$ or else we could move that vertex $X$ and increase the size of an independent set. If $Y$ has any edges remove them. The remaining edges is an edge covering of $H$. So $\beta'(H)\geq \alpha(H)$. 
Let $X$ be any independent set of $H$ and $Y=V(H)\backslash X$. Then any edge covering $H$ must have at least $|X|$ edges. This is true for all edge coverings so $\beta'(H)\leq \alpha(H)$. 
I didn't use bipartite at all and if I assume the theorem is correct it proves all graphs are bipartite. 
Any hints of ideas would be very useful. I got stuck on $\Leftarrow$.  
 A: First, you’ve reversed your conclusions: if the arguments were correct, the first would show that $\beta'(H)\le\alpha(H)$ and the second that $\beta'(H)\ge\alpha(H)$. The second argument is correct, but the first isn’t. To see where it goes wrong, apply it to $K_3$, a triangle. $X$ contains a single vertex, and both vertices in $Y$ are connected to that same vertex: your edge cover has cardinality $2$, not $1$ (and indeed $\alpha(K_3)=1$ while $\beta'(K_3)=2$).
Assume that $\alpha(H)=\beta'(H)$ for each subgraph $H$ of $G$ having no isolated vertices; you want to show that $G$ must be bipartite. HINT: If not, $G$ contains an odd cycle.
Edit, 11 Jue 2020
My original suggested proof for the other direction was nonsense, as pointed out by Mahsa in another answer while I was away and now by PAB in the comments; I tried to make it easier than it actually is. Here is a corrected version:
The result follows from three standard results. 


*

*Let $\tau(G)$ be the vertex covering number of $G$; then $\alpha(G)+\tau(G)=|V(G)|$.

*Let $\nu(G)$ be the matching number of $G$; then $\nu(G)+\beta'(G)=|V(G)|$ if $G$ has no isolated vertex.

*(König) If $G$ is bipartite, then $\tau(G)=\nu(G)$.


Thus, if $G$ is bipartite and has no isolated points,
$$\beta'(G)=|V(G)|-\nu(G)=|V(G)|-\tau(G)=\alpha(G)\;.$$
The first two are fairly easy to prove. 
For the first one, suppose that $X$ is a vertex cover such that $|X|=\tau(G)$. Then $V(G)\setminus X$ is an independent set of vertices, so $\alpha(G)\ge|V(G)|-\tau(G)$, i.e., $$\alpha(G)+\tau(G)\ge|V(G)|\;.$$ On the other hand, if $X$ is an independent set of vertices, and $|X|=\alpha(X)$, then $V(G)\setminus X$ is a vertex cover, so $\tau(G)\le|V(G)|-\alpha(G)$, i.e., $$\alpha(G)+\tau(G)\le|V(G)|\;.$$
For the second, let $F$ be an edge cover such that $|F|=\beta'(G)$. From each component of the graph $\langle V(G),F\rangle$ choose one edge; the result is a matching $M$. The graph $\langle V(G),F\rangle$ has at least $|V(G)|-|F|$ components — $\langle V(G),\varnothing\rangle$ has $|V(G)|$ components, and adding an edge reduces the number of components by at most $1$ — so $$\nu(G)\ge|M|\ge|V(G)|-|F|=|V(G)|-\beta'(G)\;,$$ i.e., $$\nu(G)+\beta'(G)\ge|V(G)|\;.$$
On the other hand, let $M$ be a matching such that $|M|=\nu(G)$. Let $W=V(G)\setminus V(M)$; since $M$ is maximal, $W$ is an independent set of vertices. There are no isolated vertices, so for each $w\in W$ we may choose an edge $e_w$ incident at $w$; let $F=\{e_w:w\in W\}$. Then $F\cup E(M)$ is an edge cover of $G$, so 
$$\begin{align*}
\beta'(G)&\le|F|+|E(M)|=|V(G)|-|V(M)|+|E(M)|\\
&=|V(G)|-2\nu(M)+\nu(M)=|V(G)|-\nu(M)\;,
\end{align*}$$
i.e.,
$$\nu(G)+\beta'(G)\le|V(G)|\;.$$
For König’s theorem see here (and many other places).
A: I think the proof is not true. There are some bipartite graphs with no isolated vertices in which 
alpha(H)\neq \max{|V(H)\cap A|,|V(H)\cap B|}=\beta'(H)\
For example. We have vertices 1,2,3,4 in part A and vertices 5,6,7,8  in part B. The vertex 4 is adjacent to all vertices of B and vertex 5 is adjacent to all vertices of A.
This graph has a stable set of size at least 6. But both parta of graph have size 4.
And why  \max{|V(H)\cap A|,|V(H)\cap B|}=\beta'(H)\?
