Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 644441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:23:29+00:00 2026-05-13T21:23:29+00:00

This seems like it would be fairly simple, but I’ve been unable to find

  • 0

This seems like it would be fairly simple, but I’ve been unable to find anything about how to do this on the web. I’m writing the steps for Kruskal’s algorithm. I need to create a list of edges sorted by weight, with labels above the weight referencing the edges, something like this:

a-b b-c c-e
 1   3   5  ...

Design and Analysis of Algorithms by Anany Levitin uses similar formatting on p. 316. If there are no other options, I suppose verbatim might work, though I was hoping to make it look a little nicer. Any recommendations?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T21:23:29+00:00Added an answer on May 13, 2026 at 9:23 pm

    As someone suggested, TikZ might be overkill, but it does work.

    \documentclass{article}
    \usepackage{tikz}
    \begin{document}
    \begin{tikzpicture}
    \draw (0,0) node[anchor=east]{a} -- (0.4,0) node[anchor=west]{b};
    \draw (0.2,0) node[anchor=north]{1};
    \draw (2,0) node[anchor=east]{b} -- (2.4,0) node[anchor=west]{c};
    \draw (2.2,0) node[anchor=north]{3};
    \draw (4,0) node[anchor=east]{c} -- (4.4,0) node[anchor=west]{e};
    \draw (4.2,0) node[anchor=north]{5};
    \end{tikzpicture}
    \end{document}
    

    EDIT: Actually, this is probably simpler and does what you want:

    \[ \left. \begin{array}{ccc}
       {a-b \atop 1} & {b-c \atop 3} & {c-e \atop 5}
       \end{array} \right. \]
    

    You can compare for yourself: tikzedgeweights.pdf

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This seems like a simple question, but I can't find it with the Stack
This seems like a silly question but I would really like your comments and
This has always confused me. It seems like this would be nicer: ["Hello", "world"].join("-")
As popular as Ruby and Rails are, it seems like this problem would already
This seems like a pretty softball question, but I always have a hard time
This seems like a very simple and a very common problem. The simplest example
This seems like such a trivial problem, but I can't seem to pin how
This seems like perhaps a naive question, but I got into a discussion with
How can I construct my ajaxSend call, this seems like the place to put
Can someone tell me how to change directories using FtpWebRequest? This seems like it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.