Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the weight in the graph #102

Merged
merged 6 commits into from
Dec 6, 2024
Merged

Remove the weight in the graph #102

merged 6 commits into from
Dec 6, 2024

Conversation

ahao27
Copy link
Contributor

@ahao27 ahao27 commented Nov 13, 2024

Change

Desciption

This PR addresses issue #101

  • The code now uses nx.to_numpy_array(G, nodelist=list(range(num_nodes))) instead of nx.to_numpy_array(G).
  • Since all weights in this example are 1, weight parameters are removed from the example to simplify the code.

@Jacomichi Jacomichi self-requested a review November 14, 2024 23:53
Copy link
Collaborator

@Jacomichi Jacomichi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can erase this $w_{ij}$ in

" \\min \\quad -\\frac{1}{2} \\sum_{(i,j) \\in E} w_{i,j}(s_i s_j - 1) \n",

Moreover, you can change the problem as maximization for explanation.

@Jacomichi Jacomichi self-requested a review December 3, 2024 01:36
Copy link
Collaborator

@Jacomichi Jacomichi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change explanation a little bit?

@@ -132,7 +132,7 @@
"The Max-Cut problem can be formulated with the following equation:\n",
Copy link
Collaborator

@Jacomichi Jacomichi Dec 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the jm.Problem is correct, however, this formula in LaTex is incorrect.
I think this should be max.

@Jacomichi Jacomichi self-requested a review December 6, 2024 06:34
@Jacomichi Jacomichi merged commit 27bcbc8 into main Dec 6, 2024
6 checks passed
@Jacomichi Jacomichi deleted the fix_maxcut_array branch December 6, 2024 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants